|
Boost : |
Subject: [boost] [TR1] can't compile with Boost installed in /usr/include (and with Boost.Test)
From: Ling Li (liling_at_[hidden])
Date: 2008-12-29 17:23:16
Fedora rawhide recently bumped the boost version from 1.34 to 1.37 so I gave
it a try. I can't compile the code below:
[ling_at_fedora-vm test]$ cat t.cpp
#include <boost/test/unit_test.hpp>
#include <memory>
BOOST_AUTO_TEST_SUITE(dummy)
BOOST_AUTO_TEST_CASE(foo) {
std::tr1::shared_ptr<int> bar;
}
BOOST_AUTO_TEST_SUITE_END()
[ling_at_fedora-vm test]$ g++ -I /usr/include/boost/tr1/tr1 -I /usr/include -c
t.cpp
In file included from /usr/include/boost/tr1/tr1/utility:19,
from /usr/include/boost/config/no_tr1/utility.hpp:21,
from /usr/include/boost/config/select_stdlib_config.hpp:20,
from /usr/include/boost/config.hpp:40,
from /usr/include/boost/test/detail/config.hpp:19,
from /usr/include/boost/test/utils/class_properties.hpp:20,
from /usr/include/boost/test/predicate_result.hpp:19,
from /usr/include/boost/test/test_tools.hpp:19,
from /usr/include/boost/test/unit_test.hpp:19,
from t.cpp:1:
/usr/include/boost/tr1/detail/config_all.hpp:117:26: error: no include path
in which to search for utility
In file included from /usr/include/boost/tr1/detail/config_all.hpp:130,
from /usr/include/boost/tr1/tr1/utility:19,
from /usr/include/boost/config/no_tr1/utility.hpp:21,
from /usr/include/boost/config/select_stdlib_config.hpp:20,
from /usr/include/boost/config.hpp:40,
from /usr/include/boost/test/detail/config.hpp:19,
from /usr/include/boost/test/utils/class_properties.hpp:20,
from /usr/include/boost/test/predicate_result.hpp:19,
from /usr/include/boost/test/test_tools.hpp:19,
from /usr/include/boost/test/unit_test.hpp:19,
from t.cpp:1:
/usr/include/boost/tr1/detail/config.hpp:25:29: error: no include path in
which to search for utility
Defining BOOST_TR1_DISABLE_INCLUDE_NEXT helps to reduce the two errors to
one,
[ling_at_fedora-vm test]$ g++ -DBOOST_TR1_DISABLE_INCLUDE_NEXT -I
/usr/include/boost/tr1/tr1 -I /usr/include -c t.cpp
In file included from /usr/include/boost/tr1/detail/config_all.hpp:130,
from /usr/include/boost/tr1/tr1/utility:19,
from /usr/include/boost/config/no_tr1/utility.hpp:21,
from /usr/include/boost/config/select_stdlib_config.hpp:20,
from /usr/include/boost/config.hpp:40,
from /usr/include/boost/test/detail/config.hpp:19,
from /usr/include/boost/test/utils/class_properties.hpp:20,
from /usr/include/boost/test/predicate_result.hpp:19,
from /usr/include/boost/test/test_tools.hpp:19,
from /usr/include/boost/test/unit_test.hpp:19,
from t.cpp:1:
/usr/include/boost/tr1/detail/config.hpp:25:29: error: no include path in
which to search for utility
I also have a local copy of Boost 1.37 at ~/include/boost, and I have no
problems with that:
[ling_at_fedora-vm test]$ g++ -I ~/include/boost/boost/tr1/tr1 -I
~/include/boost -c t.cpp
Do you know what I am missing here? Thanks in advance for any tips.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk