Page 1 of 1

c++ 1st try

Posted: Fri Mar 18, 2016 4:21 pm
by murfinp
Hi

I am just trying to build a core dlm ... code below ...

I am getting the following errors:

Warning 1 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. c:\strategy2\strategy2\strategyinterfaceunit.h 1110 Strategy2
Warning 2 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. c:\strategy2\strategy2\strategyinterfaceunit.h 1606 Strategy2
Warning 3 warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\strategy2\strategy2\strategyinterfaceunit.h 1607 Strategy2
Error 4 error C2572: 'ObjectsDeleteAll' : redefinition of default parameter : parameter 2 c:\strategy2\strategy2\strategyinterfaceunit.h 1726 Strategy2
Error 5 error C2572: 'ObjectsDeleteAll' : redefinition of default parameter : parameter 1 c:\strategy2\strategy2\strategyinterfaceunit.h 1726 Strategy2

How do i resolve these please?

Thanks


==================================

#include "stdafx.h"
#include "stdlib.h"


#include <windows.h>

#include "StrategyInterfaceUnit.h"
#include "TechnicalFunctions.h"


EXPORT void __stdcall InitStrategy()
{
StrategyShortName("DemoStrategy");
StrategyDescription("Demo strategy that does nothing");
}

EXPORT void __stdcall DoneStrategy()
{

}

EXPORT void __stdcall ResetStrategy()
{

}

EXPORT void __stdcall GetSingleTick()
{

}

Re: c++ 1st try

Posted: Mon Jul 10, 2017 3:21 am
by imamushroom
Hi,

Try adding the option _CRT_SECURE_NO_WARNINGS to the Command Line of the VC++ Compiler Options. That should fix it.