Boost logo

Boost Users :

Subject: [Boost-users] Linking issue with Boost 1.44 and GCC 4.6
From: Joseph Sulewski (joemacher_at_[hidden])
Date: 2012-10-20 14:16:46


Hi,

I'm having a very strange compilation issue with Boost. I've used boost in
other C++ projects in the past and have had no issues.

I'm writing a program to compile against Hypertable which relies on the
boost 1.44 version of the library. I'm writing this on Intel Linux and
compiling with GCC 4.6.3

Here is my linker command. I removed the .o's from my application to make
it simpler to read:
g++ -L/opt/hypertable/current/lib
-L/home/l3/development/libraries/boost_1_44_0/stage/lib -pthread -o
"AppLogger" MYDOT-O-FILES.o -lboost_system -lboost_iostreams
-lboost_filesystem -lboost_program_options -lboost_thread -lsigar-x86-linux
-lz -lHypertable -lHyperspace -lHyperTools -lHyperComm -lHyperCommon

As you can see I'm including a number of boost libraries but I'm getting a
lot of very strange errors.
For example,
opt/hypertable/current/lib/libHypertable.a(Client.cc.o): In function
`Hypertable::Client::Client(std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, unsigned int)':
Client.cc:(.text+0x26a5): undefined reference to
`boost::program_options::variables_map::variables_map()'

>From what I can see the precompiled library from Hypertable is not finding
the functions in the boost library.

Here is another I get
Client.cc:(.text+0x26a5): undefined reference to
`boost::program_options::variables_map::variables_map()'
/opt/hypertable/current/lib/libHypertable.a(Client.cc.o): In function
`Hypertable::Client::Client(std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, unsigned int)':

I get a bunch of these:
HqlInterpreter.cc:(.text._ZN5boost9call_onceIPFvvEEEvRNS_9once_flagET_[void
boost::call_once<void (*)()>(boost::once_flag&, void (*)())]+0x151):
undefined reference to `boost::detail::once_epoch_cv'

There are many many more linker errors but I didn't want to clog up the
system with all the errors.

Any ideas would be greatly appreciated
Thanks



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net