Re: [Quickfix-users] Socket Initiator build error
Brought to you by:
orenmnero
From: gtsafas <gt...@rb...> - 2010-01-07 18:56:44
|
I was able to build with -c When I try g++ myinit.cpp MYAPP.cpp I get this new error /tmp/ccqcUJdt.o: In function `main': myinit.cpp:(.text+0x78): undefined reference to `FIX::SessionSettings::SessionSettings(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' myinit.cpp:(.text+0x111): undefined reference to `FIX::SocketInitiator::SocketInitiator(FIX::Application&, FIX::MessageStoreFactory&, FIX::SessionSettings const&, FIX::LogFactory&)' myinit.cpp:(.text+0x11d): undefined reference to `FIX::Initiator::start()' myinit.cpp:(.text+0x153): undefined reference to `FIX::SocketInitiator::~SocketInitiator()' /tmp/ccqcUJdt.o: In function `FIX::FileStoreFactory::FileStoreFactory(FIX::SessionSettings const&)': myinit.cpp:(.text._ZN3FIX16FileStoreFactoryC2ERKNS_15SessionSettingsE[_ZN3FIX16FileStoreFactoryC5ERKNS_15SessionSettingsE]+0x18): undefined reference to `vtable for FIX::FileStoreFactory' /tmp/ccqcUJdt.o: In function `FIX::ScreenLogFactory::ScreenLogFactory(FIX::SessionSettings const&)': myinit.cpp:(.text._ZN3FIX16ScreenLogFactoryC2ERKNS_15SessionSettingsE[_ZN3FIX16ScreenLogFactoryC5ERKNS_15SessionSettingsE]+0x18): undefined reference to `vtable for FIX::ScreenLogFactory' /tmp/ccqcUJdt.o: In function `FIX::FileStoreFactory::~FileStoreFactory()': myinit.cpp:(.text._ZN3FIX16FileStoreFactoryD2Ev[_ZN3FIX16FileStoreFactoryD5Ev]+0xd): undefined reference to `vtable for FIX::FileStoreFactory' /tmp/ccqcUJdt.o: In function `FIX::ScreenLogFactory::~ScreenLogFactory()': myinit.cpp:(.text._ZN3FIX16ScreenLogFactoryD2Ev[_ZN3FIX16ScreenLogFactoryD5Ev]+0xd): undefined reference to `vtable for FIX::ScreenLogFactory' collect2: ld returned 1 exit status gtsafas wrote: > > Thank you I have made that change, I am having a new compile issue perhaps > someone could help me with > g++ -c myinit.cpp MYAPP.cpp throws this > > > MYAPP.cpp: In function ‘void fromApp(const FIX::Message&, const > FIX::SessionID&)’: > MYAPP.cpp:9: error: ‘crack’ was not declared in this scope > MYAPP.cpp: In function ‘void onMessage(const FIX42::NewOrderSingle&, const > FIX::SessionID&)’: > MYAPP.cpp:15: error: invalid use of incomplete type ‘const struct > FIX42::NewOrderSingle’ > /opt/quickfix/include/quickfix/fix42/MessageCracker.h:58: error: forward > declaration of ‘const struct FIX42::NewOrderSingle’ > ROSNAPP.cpp:18: error: invalid use of incomplete type ‘const struct > FIX42::NewOrderSingle’ > /opt/quickfix/include/quickfix/fix42/MessageCracker.h:58: error: forward > declaration of ‘const struct FIX42::NewOrderSingle’ > MYAPP.cpp: In function ‘void onMessage(const FIX41::NewOrderSingle&, const > FIX::SessionID&)’: > MYAPP.cpp:24: error: invalid use of incomplete type ‘const struct > FIX41::NewOrderSingle’ > /opt/quickfix/include/quickfix/fix41/MessageCracker.h:44: error: forward > declaration of ‘const struct FIX41::NewOrderSingle’ > MYAPP.cpp:28: error: invalid use of incomplete type ‘const struct > FIX41::NewOrderSingle’ > /opt/quickfix/include/quickfix/fix41/MessageCracker.h:44: error: forward > declaration of ‘const struct FIX41::NewOrderSingle’ > MYAPP.cpp: In function ‘void onMessage(const FIX42::OrderCancelRequest&, > const FIX::SessionID&)’: > MYAPP.cpp:34: error: invalid use of incomplete type ‘const struct > FIX42::OrderCancelRequest’ > /opt/quickfix/include/quickfix/fix42/MessageCracker.h:62: error: forward > declaration of ‘const struct FIX42::OrderCancelRequest’ > MYAPP.cpp:38: error: invalid use of incomplete type ‘const struct > FIX42::OrderCancelRequest’ > /opt/quickfix/include/quickfix/fix42/MessageCracker.h:62: error: forward > declaration of ‘const struct FIX42::OrderCancelRequest’ > > > > Here is MYAPP.cpp > > > #include "/home/gt/SCRIPTS/GT-fix/MYAPP.h" > #include "/opt/quickfix/include/quickfix/Session.h" > #include "/opt/quickfix/include/quickfix/MessageCracker.h" > > void fromApp( const FIX::Message& message, const FIX::SessionID& > sessionID ) > throw( FIX::FieldNotFound&, FIX::IncorrectDataFormat&, > FIX::IncorrectTagValue&, FIX::UnsupportedMessageType& ) > { > crack(message, sessionID); > } > > void onMessage( const FIX42::NewOrderSingle& message, const > FIX::SessionID& ) > { > FIX::ClOrdID clOrdID; > message.get(clOrdID); > > FIX::ClearingAccount clearingAccount; > message.get(clearingAccount); > } > > void onMessage( const FIX41::NewOrderSingle& message, const > FIX::SessionID& ) > { > FIX::ClOrdID clOrdID; > message.get(clOrdID); > > // compile time error!! field not defined in FIX41 > FIX::ClearingAccount clearingAccount; > message.get(clearingAccount); > } > > void onMessage( const FIX42::OrderCancelRequest& message, const > FIX::SessionID& ) > { > FIX::ClOrdID clOrdID; > message.get(clOrdID); > > // compile time error!! field not defined for OrderCancelRequest > FIX::Price price; > message.get(price); > } > > > here is MYAPP.h > > > #include "/opt/quickfix/include/quickfix/Application.h" > #include "/opt/quickfix/include/quickfix/MessageCracker.h" > #include <queue> > #include <iostream> > > > > class MyApplication > > : public FIX::Application, > public FIX::MessageCracker > { > > > void onCreate( const FIX::SessionID& ) {} > void onLogon( const FIX::SessionID& sessionID ); > void onLogout( const FIX::SessionID& sessionID ); > > void toAdmin( FIX::Message&, const FIX::SessionID& ) {} > > void toApp( FIX::Message&, const FIX::SessionID& ) throw( > FIX::DoNotSend ) {} > > void fromAdmin( const FIX::Message&, const FIX::SessionID& ) > throw( FIX::FieldNotFound, FIX::IncorrectDataFormat, > FIX::IncorrectTagValue, FIX::RejectLogon ) {} > > void fromApp( const FIX::Message& message, const FIX::SessionID& > sessionID ) > throw( FIX::FieldNotFound, FIX::IncorrectDataFormat, > FIX::IncorrectTagValue, FIX::UnsupportedMessageType ); > > > void onMessage( const FIX42::NewOrderSingle& message, const > FIX::SessionID& ); > void onMessage( const FIX41::NewOrderSingle& message, const > FIX::SessionID& ); > void onMessage( const FIX42::OrderCancelRequest& message, const > FIX::SessionID& ); > > > > > }; > > > > I have not modified the original quickfix files, any help is greatly > appreciated. THANKS! > -- View this message in context: http://old.nabble.com/Socket-Initiator-build-error-tp27026921p27065131.html Sent from the QuickFIX - User mailing list archive at Nabble.com. |