У меня есть огромный проект, в котором я использую boost. boost поставляется с моим исходным деревом в определенной папке, где находятся заголовок и lib для gcc 32 бит и 64 бит в отдельной подпапке.Ошибка связи с `boost :: log2_mt` только на Ubuntu 32/64bits
о Centos: Linux .... SMP Tue Jun 12 09:58:12 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
Нет проблем каждый link прекрасный.
Но одно и то же исходное дерево на Ubuntu: Linux ... 3.2.0-48-generiC#74-Ubuntu SMP Thu Jun 6 19:43:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
не работает с ошибкой компоновщика.
libtest.so: undefined reference to `boost::log2_mt_posix::aux::sem_based_event::~sem_based_event()'
libtest.so: undefined reference to `boost::log2_mt_posix::aux::sem_based_event::sem_based_event()'
libtest.so: undefined reference to `boost::log2_mt_posix::aux::sem_based_event::set_signalled()'
libtest.so: undefined reference to `boost::log2_mt_posix::aux::sem_based_event::wait()'
нижеследующая строка командной строки линкера ... Любая помощь приветствуется!
/usr/bin/ccache g++ -m32 -lrt -L/home/abuisson/dev/fwk/build/lin32_release -L/home/abuisson/dev/fwk/Source/../Libs/boost/Lin32 -L/home/abuisson/dev/fwk/Source/../Libs/ace/Lin32 -L/home/abuisson/dev/fwk/Source/../Libs/SafeNetRMS/Lin32 -L/home/abuisson/dev/fwk/Source/../Libs/OpenSSL/bin/out32StaticMTReleaseLinux -L/home/abuisson/dev/fwk/Source/../Libs/TinyXML/Lin32/ReleaseStaticMT -L/home/abuisson/dev/fwk/Source/../Libs/zlib/Lin32 -L/home/abuisson/dev/fwk/Source/../Libs/Curl/Lin32 -L/home/abuisson/dev/fwk/Source/../Libs/microhttpd/Lin32 -L/home/abuisson/dev/fwk/Source/../Libs/Intel/Linux32 -L/home/abuisson/dev/fwk/Source/../Libs/IPP/Lin32 -L/home/abuisson/dev/fwk/Source/../Libs/xerces/lin32 CMakeFiles/Frameworktst.dir/Framework/FrameworkTst/FrameworkTimerTst.cpp.o CMakeFiles/Frameworktst.dir/Framework/FrameworkTst/FrameworkTst.cpp.o CMakeFiles/Frameworktst.dir/Framework/FrameworkTst/WriterTst.cpp.o CMakeFiles/Frameworktst.dir/Framework/FrameworkTst/FrameworkLogTst.cpp.o -o Frameworktst libFramework.so libVersionInfoLib.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_thread-gcc41-mt-1_49.a -lpthread /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_system-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_date_time-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_regex-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_signals-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_filesystem-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_program_options-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_log-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_log_setup-gcc41-mt-1_49.a -lpthread -ldl -lrt libTestMediaPlugin.so libFramework.so libVersionInfoLib.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_thread-gcc41-mt-1_49.a -lpthread /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_system-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_date_time-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_regex-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_signals-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_filesystem-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_program_options-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_log-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_log_setup-gcc41-mt-1_49.a -lpthread -ldl -lrt libTestAlgorithmPlugin.so libFramework.so libVersionInfoLib.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_thread-gcc41-mt-1_49.a -lpthread /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_system-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_date_time-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_regex-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_signals-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_filesystem-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_program_options-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_log-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_log_setup-gcc41-mt-1_49.a -lpthread -ldl -lrt libTestChannel.so libFramework.so libVersionInfoLib.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_thread-gcc41-mt-1_49.a -lpthread /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_system-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_date_time-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_regex-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_signals-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_filesystem-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_program_options-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_log-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_log_setup-gcc41-mt-1_49.a -lpthread -ldl -lrt libYaffut.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_thread-gcc41-mt-1_49.a -lpthread /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_system-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_date_time-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_regex-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_signals-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_filesystem-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_program_options-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_log-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_log_setup-gcc41-mt-1_49.a -lpthread libWMCommon.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_thread-gcc41-mt-1_49.a -lpthread /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_system-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_date_time-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_regex-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_signals-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_filesystem-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_program_options-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_log-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_log_setup-gcc41-mt-1_49.a -lpthread /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_thread-gcc41-mt-1_49.a -lpthread /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_system-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_date_time-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_regex-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_signals-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_filesystem-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_program_options-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_log-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_log_setup-gcc41-mt-1_49.a -lpthread /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_system-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_date_time-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_regex-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_signals-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_filesystem-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_program_options-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_log-gcc41-mt-1_49.a /home/abuisson/dev/fwk/Libs/boost/Lin32/libboost_log_setup-gcc41-mt-1_49.a -ldl -lrt -Wl,-rpath,/home/abuisson/dev/fwk/build/lin32_release
libFramework.so: undefined reference to `boost::log2_mt_posix::aux::sem_based_event::~sem_based_event()'
libFramework.so: undefined reference to `boost::log2_mt_posix::aux::sem_based_event::sem_based_event()'
libFramework.so: undefined reference to `boost::log2_mt_posix::aux::sem_based_event::set_signalled()'
libFramework.so: undefined reference to `boost::log2_mt_posix::aux::sem_based_event::wait()'
Вы следовали [документации] (http://www.boost.org/doc/libs/1_54_0_beta1/libs/log/doc/html/log/installation/config.html)? – TemplateRex
@TemplateRex, На самом деле не так, как я использую упакованную версию, и я использую точно те же файлы .a и .hpp на Centos и Ubuntu. Я не понимаю, как я могу встретить ошибку связи только на одной платформе? если что-то не хватает, у меня должна быть такая же ошибка для обоих! – alexbuisson