Hi,
I have found some interested behaviour. If I build typelib with this options:
mkdir build
cd build
CXXFLAGS=$CFLAGS LDFLAGS="-Wl,-z,defs" cmake ../
make
I got this error when try wit link with boost:
MakeFiles/typeLib.dir/typename.o: In function
`__static_initialization_and_destruction_0(int, int)':
typename.cc:(.text+0xb70): undefined reference to
`boost::system::get_system_category()'
typename.cc:(.text+0xb7c): undefined reference to
`boost::system::get_generic_category()'
typename.cc:(.text+0xb88): undefined reference to
`boost::system::get_generic_category()'
typename.cc:(.text+0xb94): undefined reference to
`boost::system::get_generic_category()'
typename.cc:(.text+0xba0): undefined reference to
`boost::system::get_system_category()'
CMakeFiles/typeLib.dir/exporter.o: In function
`__static_initialization_and_destruction_0(int, int)':
exporter.cc:(.text+0x1101): undefined reference to
`boost::system::get_system_category()'
exporter.cc:(.text+0x110d): undefined reference to
`boost::system::get_generic_category()'
exporter.cc:(.text+0x1119): undefined reference to
`boost::system::get_generic_category()'
exporter.cc:(.text+0x1125): undefined reference to
`boost::system::get_generic_category()'
exporter.cc:(.text+0x1131): undefined reference to
`boost::system::get_system_category()'
CMakeFiles/typeLib.dir/pluginmanager.o: In function
`__static_initialization_and_destruction_0(int, int)':
pluginmanager.cc:(.text+0x17ff): undefined reference to
`boost::system::get_system_category()'
pluginmanager.cc:(.text+0x180b): undefined reference to
`boost::system::get_generic_category()'
pluginmanager.cc:(.text+0x1817): undefined reference to
`boost::system::get_generic_category()'
pluginmanager.cc:(.text+0x1823): undefined reference to
`boost::system::get_generic_category()'
pluginmanager.cc:(.text+0x182f): undefined reference to
`boost::system::get_system_category()'
CMakeFiles/typeLib.dir/pluginmanager.o: In function
`boost::system::error_code::error_code()':
pluginmanager.cc:
(.text._ZN5boost6system10error_codeC1Ev[boost::system::error_code::error_code()]+0x17):
undefined reference to `boost::system::get_system_category()'
CMakeFiles/typeLib.dir/pluginmanager.o: In function
`boost::enable_if<boost::filesystem::is_basic_path
boost::filesystem::exists<boost::filesystem::basic_path
>(boost::filesystem::basic_path<std::basic_string
pluginmanager.cc:
(.text._ZN5boost10filesystem6existsINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEbE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path
boost::filesystem::exists<boost::filesystem::basic_path
>(boost::filesystem::basic_path<std::basic_string
`boost::filesystem::detail::status_api(std::basic_string<char,
std::char_traits
CMakeFiles/typeLib.dir/pluginmanager.o: In function
`boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path
>::m_init(boost::filesystem::basic_path<std::basic_string
pluginmanager.cc:
(.text._ZN5boost10filesystem24basic_directory_iteratorINS0_10basic_pathISsNS0_11path_traitsEEEE6m_initERKS4_[boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path
>::m_init(boost::filesystem::basic_path<std::basic_string
`boost::filesystem::detail::not_found_error()'
pluginmanager.cc:
(.text._ZN5boost10filesystem24basic_directory_iteratorINS0_10basic_pathISsNS0_11path_traitsEEEE6m_initERKS4_[boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path
>::m_init(boost::filesystem::basic_path<std::basic_string
`boost::filesystem::detail::dir_itr_first(void*&, void*&,
std::basic_string<char, std::char_traits
CMakeFiles/typeLib.dir/pluginmanager.o: In function
`boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path
pluginmanager.cc:
(.text._ZN5boost10filesystem24basic_directory_iteratorINS0_10basic_pathISsNS0_11path_traitsEEEE9incrementEv[boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path
to `boost::filesystem::detail::dir_itr_increment(void*&, void*&,
std::basic_string<char, std::char_traits
CMakeFiles/typeLib.dir/pluginmanager.o: In function
`boost::filesystem::detail::dir_itr_imp<boost::filesystem::basic_path
pluginmanager.cc:
(.text._ZN5boost10filesystem6detail11dir_itr_impINS0_10basic_pathISsNS0_11path_traitsEEEED1Ev[boost::filesystem::detail::dir_itr_imp<boost::filesystem::basic_path
to `boost::filesystem::detail::dir_itr_close(void*&, void*&)'
CMakeFiles/typeLib.dir/csvoutput.o: In function
`__static_initialization_and_destruction_0(int, int)':
csvoutput.cc:(.text+0x1543): undefined reference to
`boost::system::get_system_category()'
csvoutput.cc:(.text+0x154f): undefined reference to
`boost::system::get_generic_category()'
csvoutput.cc:(.text+0x155b): undefined reference to
`boost::system::get_generic_category()'
csvoutput.cc:(.text+0x1567): undefined reference to
`boost::system::get_generic_category()'
csvoutput.cc:(.text+0x1573): undefined reference to
`boost::system::get_system_category()'
collect2: ld returned 1 exit status
make[2]: *** [typelib/libtypeLib.so.1.1] Error 1
make[1]: *** [typelib/CMakeFiles/typeLib.dir/all] Error 2
make: *** [all] Error 2
it fails with debian lenny and squeeze and boost 1.40 and 1.42. This
parameters are the ones that orocos uses to create the debian package. Just
curiosity.
Regards,
Leo