Boost logo

Boost :

Subject: [boost] [test] Dynamic linking problem?
From: Matthijs Möhlmann (matthijs_at_[hidden])
Date: 2012-02-28 08:23:43


Hello all,

Attached a testcase how I use the boost test library.

Compiling goes well, but when I try to run it I get a 'symbol lookup error':

matthijs_at_hammer % ./main
./main: symbol lookup error: ./main: undefined symbol: _ZN5boost9unit_test9ut_detail24auto_test_unit_registrarC1ENS0_13basic_cstringIKcEE

I compile my files with the following lines:
g++ -o main.o -c -I/usr/src/boost_1_49_0 -g -Werror -Wall -std=c++0x main.cpp
g++ -o test.o -c -I/usr/src/boost_1_49_0 -g -Werror -Wall -std=c++0x test.cpp
g++ -o main -L/usr/src/boost_1_49_0/stage/lib main.o test.o -lboost_unit_test_framework

This is done with a fresh install of boost 1.49. (Compiled with ./bootstrap.sh && ./b2 -j3)

Compiler: gcc-4.6

If I use the most recent version of trunk (r77131) then everything works as expected.

If more information is needed, please let me know.

Regards,

Matthijs Möhlmann






Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk