[Quickfix-developers] Acceptor Compilation Error
Brought to you by:
orenmnero
From: Patrick L. <pat...@an...> - 2020-07-28 15:51:39
|
Hello, Please see attached the example code for the "Acceptor" taken from: http://www.quickfixengine.org/quickfix/doc/html/application.html Please note that before deciding to post this question, I have consulted the mailing list and StackOverflow where I found a similar question (which sadly didn't result in a solution for my issue). This question can be found here: *https://stackoverflow.com/questions/30358675/compiling-a-quickfix-program <https://stackoverflow.com/questions/30358675/compiling-a-quickfix-program>* When I try to compile the example code (on Ubuntu 18.04.2 LTS), I receive the following errors: *trade_client_test.cpp: In function ‘int main(int, char**)’:trade_client_test.cpp:17:3: error: ‘MyApplication’ was not declared in this scope MyApplication application; ^~~~~~~~~~~~~trade_client_test.cpp:21:6: error: ‘application’ was not declared in this scope (application, storeFactory, settings, logFactory /*optional*/); ^~~~~~~~~~~* *I am using the following command to compile a file called "trade_client_test.cpp" which is attached to this email:* *g++ trade_client_test.cpp -std=c++11 -fexceptions -finline-functions -lquickfix -lpthread -lxml2* I have included the header files where these declarations should be (I think). I then decided to rename "MyApplication" to "Application", which gave a slightly different set of errors: trade_client_test.cpp: In function ‘int main(int, char**)’: trade_client_test.cpp:17:3: error: ‘Application’ was not declared in this scope Application application; ^~~~~~~~~~~ trade_client_test.cpp:17:3: note: suggested alternative: In file included from /usr/local/include/quickfix/Acceptor.h:29:0, from /usr/local/include/quickfix/SocketAcceptor.h:29, from trade_client_test.cpp:3: /usr/local/include/quickfix/Application.h:43:7: note: ‘FIX::Application’ class Application ^~~~~~~~~~~ trade_client_test.cpp:21:6: error: ‘application’ was not declared in this scope (application, storeFactory, settings, logFactory /*optional*/); I've been stuck on this for a while and I haven't had much success in finding a solution. If someone could help me figure out how to solve this issue step-by-step, I would greatly appreciate it. Thanks, Patrick |