I can reproduce with CMake / CVS.
FIND_PACKAGE ( Boost COMPONENTS filesystem ) ADD_LIBRARY( bla SHARED bla_use_filesystem.cxx) TARGET_LINK_LIBRARIES( bla ${Boost_LIBRARIES} ) -> CMakeFiles/Csm.dir/Common/csmPathSet.cc.o: In function `__static_initialization_and_destruction_0': /usr/include/boost/system/error_code.hpp:205: undefined reference to `boost::system::get_system_category()' /usr/include/boost/system/error_code.hpp:206: undefined reference to `boost::system::get_generic_category()' /usr/include/boost/system/error_code.hpp:211: undefined reference to `boost::system::get_generic_category()' /usr/include/boost/system/error_code.hpp:212: undefined reference to `boost::system::get_generic_category()' /usr/include/boost/system/error_code.hpp:213: undefined reference to `boost::system::get_system_category()' CMakeFiles/Csm.dir/IO/csmGraphLoader.cc.o: In function `__static_initialization_and_destruction_0': /usr/include/boost/system/error_code.hpp:205: undefined reference to `boost::system::get_system_category()' /usr/include/boost/system/error_code.hpp:206: undefined reference to `boost::system::get_generic_category()' /usr/include/boost/system/error_code.hpp:211: undefined reference to `boost::system::get_generic_category()' /usr/include/boost/system/error_code.hpp:212: undefined reference to `boost::system::get_generic_category()' /usr/include/boost/system/error_code.hpp:213: undefined reference to `boost::system::get_system_category()' CMakeFiles/Csm.dir/IO/csmChessBoardLoader.cc.o: In function `__static_initialization_and_destruction_0': /usr/include/boost/system/error_code.hpp:205: undefined reference to `boost::system::get_system_category()' /usr/include/boost/system/error_code.hpp:206: undefined reference to `boost::system::get_generic_category()' /usr/include/boost/system/error_code.hpp:211: undefined reference to `boost::system::get_generic_category()' /usr/include/boost/system/error_code.hpp:212: undefined reference to `boost::system::get_generic_category()' /usr/include/boost/system/error_code.hpp:213: undefined reference to `boost::system::get_system_category()' CMakeFiles/Csm.dir/IO/csmModelLoader.cc.o: In function `__static_initialization_and_destruction_0': /usr/include/boost/system/error_code.hpp:205: undefined reference to `boost::system::get_system_category()' /usr/include/boost/system/error_code.hpp:206: undefined reference to `boost::system::get_generic_category()' /usr/include/boost/system/error_code.hpp:211: undefined reference to `boost::system::get_generic_category()' /usr/include/boost/system/error_code.hpp:212: undefined reference to `boost::system::get_generic_category()' /usr/include/boost/system/error_code.hpp:213: undefined reference to `boost::system::get_system_category()' What should have I been writing instead ? Thanks ! On Mon, Nov 2, 2009 at 4:41 PM, Philip Lowman <phi...@yhbt.com> wrote: > Which FindBoost are you using? I'm pretty sure I fixed this issue a while > ago. > > On Nov 2, 2009 9:46 AM, "Mathieu Malaterre" <mathieu.malate...@gmail.com> > wrote: > > Hi there, > > I am wondering if I am missing something. I'd like to write: > > FIND_PACKAGE ( Boost COMPONENTS filesystem ) > > However using a recent boost (1.40), it gives a linker error. So I > need to write something like: > > FIND_PACKAGE ( Boost COMPONENTS filesystem system ) > > but then it breaks compatibility with boost 1.34 (default package on > one of my ubuntu machine). What is the synthetic way for writing this > ? I am linking to filesystem, I do not want to explicitely search for > an implementation detail. > > Thanks, > -- > Mathieu > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/listinfo/cmake > -- Mathieu _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake