Boost logo

Boost Users :

From: Shawn Church (sl_church_at_[hidden])
Date: 2004-02-05 15:56:41


I am having problems compiling using the included form of the test
execution monitor library. I have not tried building the library
seperately and linking. The following test illustrates the problem:

#include "boost/test/included/test_exec_monitor.hpp"

int test_main(int argc, char *argv[])
{
    BOOST_CHECK("TEST ME");
}

/*

When used with boost 1.30.2

Building Makefile: "C:\Dev-Cpp\Local\sql\Mingw32\Makefile.win"
Executing make...
make.exe -f "C:\Dev-Cpp\Local\sql\Mingw32\Makefile.win" all
g++.exe -c ../src/test_main.cpp -o ../src/test_main.o
-I"C:/Dev-Cpp/include/c++"
-I"C:/Dev-Cpp/include/c++/mingw32" -I"C:/Dev-Cpp/include/c++/backward"
-I"C:/Dev-Cpp/include"
-I"C:/Dev-Cpp/Local/boost-1.30.2" <<<<< The only change is here.
-fexceptions -fmessage-length=0

g++.exe ../src/test_main.o -o "Sql.exe" -L"C:/Dev-Cpp/lib"
../../../lib/libodbc32.a

Execution terminated
Compilation successful

Output:

Platform: Win32
Compiler: GNU C++ version 3.2 (mingw special 20020817-1)
STL : GNU libstdc++ version 20020816
Boost : 1.30.2
Entering test case "call_test_main"
../src/test_main.cpp(5): info: test "TEST ME" passed
C:/Dev-Cpp/Local/boost-1.30.2/libs/test/src/test_main.cpp(40): error in
"call_test_main": test test_main_result == 0 || test_main_result ==
boost::exit_success failed
Leaving test case "call_test_main"

Test case "call_test_main" failed with:
1 assertion out of 2 passed
1 assertion out of 2 failed

When compiling with 1.31.0

Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\Local\sql\Mingw32\Makefile.win"
Executing make...
make.exe -f "C:\Dev-Cpp\Local\sql\Mingw32\Makefile.win" all
g++.exe -c ../src/test_main.cpp -o ../src/test_main.o
-I"C:/Dev-Cpp/include/c++"
-I"C:/Dev-Cpp/include/c++/mingw32" -I"C:/Dev-Cpp/include/c++/backward"
-I"C:/Dev-Cpp/include"
-I"C:/Dev-Cpp/Local/boost_1_31_0" <<< The only change is here !!!!!
-fexceptions -fmessage-length=0

In file included from
C:/Dev-Cpp/include/boost/test/included/test_exec_monitor.hpp:20,
                 from ../src/test_main.cpp:1:
C:/Dev-Cpp/Local/boost_1_31_0/libs/test/src/execution_monitor.cpp:185: no
`int boost::execution_monitor::run_function()' member function declared in
class `boost::execution_monitor'
C:/Dev-Cpp/Local/boost_1_31_0/libs/test/src/execution_monitor.cpp: In
member function `int boost::execution_monitor::run_function()':
C:/Dev-Cpp/Local/boost_1_31_0/libs/test/src/execution_monitor.cpp:186:
`m_custom_translators' undeclared (first use this function)
C:/Dev-Cpp/Local/boost_1_31_0/libs/test/src/execution_monitor.cpp:186:
(Each undeclared identifier is reported only once for each function it
appears in.)

.... I deleted 100+ lines of errors here ....

C:/Dev-Cpp/include/boost/test/detail/unit_test_monitor.hpp:51:
`target_test_case_' undeclared (first use this function)
C:/Dev-Cpp/include/boost/test/detail/unit_test_monitor.hpp:51: only
constructors take base initializers
C:/Dev-Cpp/include/boost/test/detail/unit_test_monitor.hpp:51: confused by
earlier errors, bailing out

make.exe: *** [../src/test_main.o] Error 1

Execution terminated

*/

I rechecked the release notes for the test library and did not see any
reason why the above should not work. Maybe i am just missing something
simple. Guess I will try building and linking it to see what happens.

-- 
Shawn Church
sl_church_at_[hidden]

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