Re: [Quickfix-developers] namespaces for libpthread and libxml?
Brought to you by:
orenmnero
From: <OM...@th...> - 2002-03-16 00:35:26
|
Since you are not using libtool also keep in mind that you will need to explicitly link zlib with -lz. This isn't documented because we use libtool and were unaware it had been doing this for us. The order of your linking arguments can be: -lquickfix -lpthread -lxml -lz -lnsl --oren, ThoughtWorks |---------+-----------------------------------------------> | | JDD...@th... | | | Sent by: | | | qui...@li...ur| | | ceforge.net | | | | | | | | | 03/15/02 05:44 PM | | | | |---------+-----------------------------------------------> >----------------------------------------------------------------------------------------------| | | | To: qui...@li... | | cc: | | Subject: Re: [Quickfix-developers] namespaces for libpthread and libxml? | >----------------------------------------------------------------------------------------------| GNU LD is a one-pass linker, so you need to put the -lxml and -lpthread after -lquickfix on your command line. I learned this the hard way too. John Duncan (312) 953-6286 "Cicero, Marlon" <mc...@va...> To: "'qui...@li...'" Sent by: <qui...@li...> qui...@li...ur cc: ceforge.net Subject: [Quickfix-developers] namespaces for libpthread and libxml? 03/15/2002 05:28 PM Hello, I'm going to take a look at this more when I get in on Monday, but was wondering if any of you ran into this. I've successfully build QuickFIX on Linux (2.4.10) using gcc 3.0.4 and am ensuring strict ISO C++ using -pedantic. However, when I use FIX::SocketInitiator, the linker can't find the thread libs, etc. I'm sure it must be something simple that I'm overlooking. > make gcc -fexceptions -finline-functions -pedantic -I/usr/local/include myfix.cpp -static -static-libgcc -lpthread -lxml -lnsl -L/usr/local/lib -lstdc++ -lquickfix -llog4cpp -o myfix /usr/local/lib/libquickfix.a(Initiator.o): In function `FIX::thread_spawn(void* (*)(void*), void*)': Initiator.o(.gnu.linkonce.t._ZN3FIX12thread_spawnEPFPvS0_ES0_+0x13): undefined reference to `pthread_create' /usr/local/lib/libquickfix.a(MessageValidator.o): In function `FIX::MessageValidator::readLibXml(std::string const&)': MessageValidator.o(.text+0x713): undefined reference to `xmlCreatePushParserCtxt' MessageValidator.o(.text+0x767): undefined reference to `xmlParseChunk' MessageValidator.o(.text+0x782): undefined reference to `xmlParseChunk' MessageValidator.o(.text+0x793): undefined reference to `xmlFreeParserCtxt' collect2: ld returned 1 exit status make: *** [myfix] Error 1 Thanks, Marlon _______________________________________________ Quickfix-developers mailing list Qui...@li... https://lists.sourceforge.net/lists/listinfo/quickfix-developers |