I want to initialize a QuickFix initiator and I used the following code:
ExtLogger.Out(MTLogOK, L"FIXExchangeAPI::initialize start");
std::string filename = "FileSettings.cfg";//cfgFileName
ExtLogger.Out(MTLogOK, L"FIXExchangeAPI::initialize filename");
FIX::SessionSettings settings(filename);
ExtLogger.Out(MTLogOK, L"FIXExchangeAPI::initialize settings");
FIX::FileStoreFactory storeFactory(settings);
FIX::ScreenLogFactory logFactory(settings);
_socketInitiator = new FIX::SocketInitiator(*this, storeFactory, settings, logFactory);
ExtLogger.Out(MTLogOK, L"FIXExchangeAPI::initialize true");
It works inside the debugger but, when I try to use it inside an executable (I'm working on Windows) the .exe file crashes after the line:
FIX::SessionSettings settings(filename);
My QuickFix configuration file is:
[DEFAULT]
ConnectionType=initiator
HeartBtInt=30
ReconnectInterval=1
FileStorePath=store
FileLogPath=log
StartTime=00:00:00
EndTime=00:00:00
UseDataDictionary=N
SocketConnectHost=127.0.0.1
[SESSION]
BeginString=FIX.4.2
SenderCompID=123
TargetCompID=Coinbase
SocketConnectPort=4198
DefaultApplVerID=9
ResetOnLogon=Y
Password=password
DataDictionary=FIX42.xml
What is happening?