Boost logo

Boost Users :

From: Michael Peterson (mtp1032_at_[hidden])
Date: 2004-11-26 16:50:24


I apologize in advance if this turns out to be a linker problem not
related to boost. So here goes:
 
For compatibility/legacy reasons, we can not use the Boost.Build
jamfiles to build our application. Accordingly, I've written a set of
traditional makefiles to build the project's executables and have run
into difficulties.
 
Specifically, when I try to link my test program against the boost test
libraries, I get an error message (reformatted for easy reading) saying
that the reference to test_main can not be resolved. Here's the spew
(formatted to make it easier to read):

g++ -g3 -L../long/debug -L/usr/lib -L/usr/local/lib
-L/usr/local/lib/stlport -L/usr/local/lib/boost
    -o "debug/unit_test" debug/longtest.o
    -lLong
    -lboost_unit_test_framework-gcc-mt-p
    -lboost_test_exec_monitor-gcc-mt-p
    -lpthread -lc
 
/usr/local/lib/boost/libboost_test_exec_monitor-gcc-mt-p.so: undefined
reference to `test_main(int, char**)' collect2: ld returned 1 exit
status make: *** [debug/unit_test] Error 1

According to nm, the undefined reference, test_main, is defined in the
exec_monitor library. I've tried reordering the libraries but no joy.
Any advice and/or hints would be very much appreciated.
 
I am using STLPort-4.6.2 and boost_1_32_0 and Linux (I386)
 
Cheers,
 
Michael
 



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