Boost logo

Boost :

From: Johan Nilsson (r.johan.nilsson_at_[hidden])
Date: 2006-03-14 05:04:24


The following fails to compile using g++ 4.0.2 under suse linux:

---
#define BOOST_TEST_MODULE foo
#include <boost/test/unit_test_suite.hpp>
---
Errors:
---
jni_at_bld-suse1:~/prj/kiruna_nmc/src/libs/rsdbcxx/rsdbcxxtest> bjam -q
...patience...
...found 2350 targets...
...updating 59 targets...
gcc.compile.c++ 
/home/jni/prj/kiruna_nmc/build/src/libs/rsdbcxx/rsdbcxxtest/gcc/debug/main.o
/home/jni/prj/kiruna_nmc/deps/src/boost/boost/test/unit_test_suite.hpp: In 
function âboost::unit_test::test_suite* init_unit_test_suite(int, char**)â:
/home/jni/prj/kiruna_nmc/deps/src/boost/boost/test/unit_test_suite.hpp:189: 
error: passing âconst boost::unit_test::literal_stringâ as âthisâ argument 
of âboost::unit_test::basic_cstring<CharT>& 
boost::unit_test::basic_cstring<CharT>::trim(boost::unit_test::basic_cstring<CharT>) 
[with CharT = const char]â discards qualifiers
    "g++"  -ftemplate-depth-100 -O0 -fno-inline -Wall -g -fPIC  -DBOOST_ALL_NO_LIB 
 -I"../../../../src/libs/rsdbcxx/rsdbcxxtest" -I"/home/jni/prj/kiruna_nmc/deps/src/boost" 
 -I"/home/jni/prj/kiruna_nmc/src/libs/rsdb/rsdb/include" -I"/home/jni/prj/kiruna_nmc/src/libs/rsdbcxx/rsdbcxx/include" 
 -c -o 
"/home/jni/prj/kiruna_nmc/build/src/libs/rsdbcxx/rsdbcxxtest/gcc/debug/main.o" 
"/home/jni/prj/kiruna_nmc/src/libs/rsdbcxx/rsdbcxxtest/main.cpp"
...failed gcc.compile.c++ 
/home/jni/prj/kiruna_nmc/build/src/libs/rsdbcxx/rsdbcxxtest/gcc/debug/main.o...
...failed updating 1 target...
---
The same code compiles using VC8 under XP. I am using the latest boost 
sources from anonymous cvs.
// Johan

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