Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2004-11-27 12:54:29


Messagechange the main(..) in your progam to test_main(...)

Robert Ramey
"Michael Peterson" <mtp1032_at_[hidden]> wrote in message
news:000001c4d401$f2dad520$1d02a8c0_at_wxp2000...
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/stlpor
t -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 mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users


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