[Test] Compiler error/missing entry point?

I installed the Boost.Test library binary using bootstrap.sh. Is the
following a valid program? If not, what is wrong? Is there a missing
entry point and, if so, how do I run the test?
Source:
#define BOOST_TEST_MODULE ExampleTestModule
#include

Michael Spece Ibanez
I installed the Boost.Test library binary using bootstrap.sh. Is the following a valid program?
Yes.
If not, what is wrong? Is there a missing entry point
It should be in the static library. You apparently do not link with it. What is your link command?
and, if so, how do I run the test?
Build it first ;) Gennadiy

The program (source below) compiles without warning or error using:
g++ -Wall -ansi -pedantic -I/usr/local/include/boost_1_39_0
TestExample.cc -o TestExample -static -L~/stage/lib/
-lboost_unit_test_framework-gcc34-mt-1_39
But then running the program results in an error: a segmentation fault
or undefined reference to
boost::unit_test::framework::master_test_suite(). How do I fix this?
Source of TestExample.cc:
#define BOOST_TEST_MODULE ExampleTestModule
#include

Michael Spece Ibanez wrote:
The program (source below) compiles without warning or error using:
g++ -Wall -ansi -pedantic -I/usr/local/include/boost_1_39_0 TestExample.cc -o TestExample -static -L~/stage/lib/ -lboost_unit_test_framework-gcc34-mt-1_39
But then running the program results in an error: a segmentation fault or undefined reference to boost::unit_test::framework::master_test_suite(). How do I fix this?
I'd guess you somehow missing shared library in LD_LIBRARY_PATH during execution. Can you run with strace? Gennadiy
participants (2)
-
Gennadiy Rozental
-
Michael Spece Ibanez