I am trying to use the example given on the QuickFix site to initiate a
connection I am receiving the following error. I just wiped the
tradeclient.cpp example thats given.
cd ../.. && /bin/sh ./config.status examples/tradeclient/Makefile depfiles
config.status: creating examples/tradeclient/Makefile
config.status: executing depfiles commands
if g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include -I.. -g -O2 -Wall
-ansi -Wpointer-arith -Wwrite-strings -I/usr/include/mysql
-I/usr/mysql/include -I/usr/include/libxml2 -MT tradeclient.o -MD -MP
-MF ".deps/tradeclient.Tpo" \
-c -o tradeclient.o `test -f 'tradeclient.cpp' || echo
'./'`tradeclient.cpp; \
then mv ".deps/tradeclient.Tpo" ".deps/tradeclient.Po"; \
else rm -f ".deps/tradeclient.Tpo"; exit 1; \
fi
tradeclient.cpp: In function ‘int main(int, char**)’:
tradeclient.cpp:19: error: ‘MyApplication’ was not declared in this scope
tradeclient.cpp:19: error: expected ‘;’ before ‘application’
tradeclient.cpp:23: error: ‘application’ was not declared in this scope
make: *** [tradeclient.o] Error 1
----Here is the code --------
#include "quickfix/FileStore.h"
#include "quickfix/FileLog.h"
#include "quickfix/SocketInitiator.h"
#include "quickfix/Session.h"
#include "quickfix/SessionSettings.h"
#include "quickfix/Application.h"
using namespace std;
using namespace FIX;
int main( int argc, char** argv )
{
try
{
if(argc < 2) return 1;
string fileName = argv[0];
SessionSettings settings(fileName);
MyApplication application;
FileStoreFactory storeFactory(settings);
FileLogFactory logFactory(settings);
SocketInitiator initiator
(application, storeFactory, settings, logFactory);
initiator.start();
// while(true) { do something }
initiator.stop();
return 0;
}
catch(ConfigError& e)
{
cout << e.what();
return 1;
}
}
Thank you ahead of time
--
View this message in context: http://old.nabble.com/C%2B%2B-QuickFix-tp27026881p27026881.html
Sent from the QuickFIX - User mailing list archive at Nabble.com.
|