The Script I am compiling is an empty Script template
Code: Select all
#include <windows.h>
#include "ScriptInterfaceUnit.h"
#include "TechnicalFunctions.h"
// External variables
//-------------------------------------------
// Initialization procedure
//-------------------------------------------
EXPORT void __stdcall Init(){
ScriptShortName("Bug Cant compile me");
ScriptDescription("Bug Cant compile me");
}
//---------------------------------------------------------------------------
// Execute script
//---------------------------------------------------------------------------
EXPORT void __stdcall Execute()
{
Print("Hello World");
}
//-------------------------------------------
// Deinitialization procedure
//-------------------------------------------
EXPORT void __stdcall Done()
{
}
Bellow are the errors produced by the v1.2 of the ScriptInterfaceUnit.h:
Code: Select all
1>------ Rebuild All started: Project: AutoMM TradeNow, Configuration: Debug Win32 ------
1> AutoMM TradeNow.cpp
1>c:\users\wessel\dropbox\development\forex tester 2\scripts\c++\bug\scriptinterfaceunit.h(968): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> c:\program files\microsoft visual studio 10.0\vc\include\string.h(105) : see declaration of 'strcpy'
1>c:\users\wessel\dropbox\development\forex tester 2\scripts\c++\bug\scriptinterfaceunit.h(1589): error C2198: 'TGetIntegerFunc' : too few arguments for call
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
The previous interface 1.0 compiled clean, a workaround is by removing lines 1586 till 1591, but we lose the Timeframe functionality
Please Fix! Attached is a minimal script example and full Visual C++ project that demonstrates the failure
Wessel