- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
我正在尝试链接我的程序可执行文件,但我不断收到错误。
拥有
boost::this_thread::sleep(boost::posix_time::milliseconds(10));
在我的源代码中,在链接器中产生以下错误:
`.text._ZN5boost16exception_detail19error_info_injectorISt13runtime_errorED2Ev' referenced in section `.text._ZN5boost16exception_detail19error_info_injectorISt13runtime_errorED1Ev[non-virtual thunk to boost::exception_detail::error_info_injector<std::runtime_error>::~error_info_injector()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail19error_info_injectorISt13runtime_errorED2Ev[_ZN5boost16exception_detail19error_info_injectorISt13runtime_errorED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
`.text._ZN5boost16exception_detail19error_info_injectorINS_9gregorian16bad_day_of_monthEED2Ev' referenced in section `.text._ZN5boost16exception_detail19error_info_injectorINS_9gregorian16bad_day_of_monthEED1Ev[non-virtual thunk to boost::exception_detail::error_info_injector<boost::gregorian::bad_day_of_month>::~error_info_injector()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail19error_info_injectorINS_9gregorian16bad_day_of_monthEED2Ev[_ZN5boost16exception_detail19error_info_injectorINS_9gregorian16bad_day_of_monthEED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
`.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian8bad_yearEEEED2Ev' referenced in section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian8bad_yearEEEED1Ev[non-virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::gregorian::bad_year> >::~clone_impl()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian8bad_yearEEEED2Ev[_ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian8bad_yearEEEED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
`.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian8bad_yearEEEED2Ev' referenced in section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian8bad_yearEEEED1Ev[non-virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::gregorian::bad_year> >::~clone_impl()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian8bad_yearEEEED2Ev[_ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian8bad_yearEEEED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
`.text._ZN5boost16exception_detail19error_info_injectorINS_9gregorian8bad_yearEED2Ev' referenced in section `.text._ZN5boost16exception_detail19error_info_injectorINS_9gregorian8bad_yearEED1Ev[non-virtual thunk to boost::exception_detail::error_info_injector<boost::gregorian::bad_year>::~error_info_injector()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail19error_info_injectorINS_9gregorian8bad_yearEED2Ev[_ZN5boost16exception_detail19error_info_injectorINS_9gregorian8bad_yearEED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
`.text._ZN5boost16exception_detail19error_info_injectorINS_9gregorian9bad_monthEED2Ev' referenced in section `.text._ZN5boost16exception_detail19error_info_injectorINS_9gregorian9bad_monthEED1Ev[non-virtual thunk to boost::exception_detail::error_info_injector<boost::gregorian::bad_month>::~error_info_injector()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail19error_info_injectorINS_9gregorian9bad_monthEED2Ev[_ZN5boost16exception_detail19error_info_injectorINS_9gregorian9bad_monthEED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
`.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian16bad_day_of_monthEEEED2Ev' referenced in section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian16bad_day_of_monthEEEED1Ev[non-virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::gregorian::bad_day_of_month> >::~clone_impl()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian16bad_day_of_monthEEEED2Ev[_ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian16bad_day_of_monthEEEED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
`.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian16bad_day_of_monthEEEED2Ev' referenced in section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian16bad_day_of_monthEEEED1Ev[non-virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::gregorian::bad_day_of_month> >::~clone_impl()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian16bad_day_of_monthEEEED2Ev[_ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian16bad_day_of_monthEEEED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
`.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorISt13runtime_errorEEED2Ev' referenced in section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorISt13runtime_errorEEED1Ev[non-virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >::~clone_impl()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorISt13runtime_errorEEED2Ev[_ZN5boost16exception_detail10clone_implINS0_19error_info_injectorISt13runtime_errorEEED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
`.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorISt13runtime_errorEEED2Ev' referenced in section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorISt13runtime_errorEEED1Ev[non-virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >::~clone_impl()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorISt13runtime_errorEEED2Ev[_ZN5boost16exception_detail10clone_implINS0_19error_info_injectorISt13runtime_errorEEED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
`.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian9bad_monthEEEED2Ev' referenced in section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian9bad_monthEEEED1Ev[non-virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::gregorian::bad_month> >::~clone_impl()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian9bad_monthEEEED2Ev[_ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian9bad_monthEEEED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
`.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian9bad_monthEEEED2Ev' referenced in section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian9bad_monthEEEED1Ev[non-virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::gregorian::bad_month> >::~clone_impl()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian9bad_monthEEEED2Ev[_ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian9bad_monthEEEED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
使用 boost::thread::condition_variable::wait 产生
src/net/libnet.a(semaphore.cpp.o): In function `interruption_checker':
/usr/local/include/boost/thread/pthread/thread_data.hpp:96: undefined reference to `boost::detail::get_current_thread_data()'
src/net/libnet.a(semaphore.cpp.o): In function `boost::condition_variable::wait(boost::unique_lock<boost::mutex>&)':
/usr/local/include/boost/thread/pthread/condition_variable.hpp:57: undefined reference to `boost::this_thread::interruption_point()'
collect2: ld returned 1 exit status
我正在使用 CMake,它告诉我 Make 发出以下命令,但失败:
/usr/bin/c++ CMakeFiles/rcon.dir/src/main.cpp.o -o rcon -rdynamic -L/usr/local/lib /usr/local/lib/libboost_system.a /usr/local/lib/libboost_thread.a -lpthread src/net/libnet.a src/log/liblogging.a -Wl,-rpath,/usr/local/lib
有什么问题吗?它在 libboost_thread.a 中链接?
更新
在命令行中的 boost 库删除 undefined
错误之前,在移动 libnet 和 liblogging(我的程序的一部分,因为我认为它很整洁而编译成静态库)之后。但是,现在我在代码中使用 boost::condition_variable 编译时得到了这些,而另一个错误没有改变:
`.text._ZN5boost16exception_detail19error_info_injectorINS_10lock_errorEED2Ev' referenced in section `.text._ZN5boost16exception_detail19error_info_injectorINS_10lock_errorEED1Ev[non-virtual thunk to boost::exception_detail::error_info_injector<boost::lock_error>::~error_info_injector()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail19error_info_injectorINS_10lock_errorEED2Ev[_ZN5boost16exception_detail19error_info_injectorINS_10lock_errorEED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
`.text._ZN5boost16exception_detail19error_info_injectorISt13runtime_errorED2Ev' referenced in section `.text._ZN5boost16exception_detail19error_info_injectorISt13runtime_errorED1Ev[non-virtual thunk to boost::exception_detail::error_info_injector<std::runtime_error>::~error_info_injector()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail19error_info_injectorISt13runtime_errorED2Ev[_ZN5boost16exception_detail19error_info_injectorISt13runtime_errorED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
`.text._ZN5boost16exception_detail19error_info_injectorINS_9gregorian16bad_day_of_monthEED2Ev' referenced in section `.text._ZN5boost16exception_detail19error_info_injectorINS_9gregorian16bad_day_of_monthEED1Ev[non-virtual thunk to boost::exception_detail::error_info_injector<boost::gregorian::bad_day_of_month>::~error_info_injector()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail19error_info_injectorINS_9gregorian16bad_day_of_monthEED2Ev[_ZN5boost16exception_detail19error_info_injectorINS_9gregorian16bad_day_of_monthEED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
`.text._ZN5boost16exception_detail19error_info_injectorINS_21thread_resource_errorEED2Ev' referenced in section `.text._ZN5boost16exception_detail19error_info_injectorINS_21thread_resource_errorEED1Ev[non-virtual thunk to boost::exception_detail::error_info_injector<boost::thread_resource_error>::~error_info_injector()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail19error_info_injectorINS_21thread_resource_errorEED2Ev[_ZN5boost16exception_detail19error_info_injectorINS_21thread_resource_errorEED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
`.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15condition_errorEEEED2Ev' referenced in section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15condition_errorEEEED1Ev[non-virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::condition_error> >::~clone_impl()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15condition_errorEEEED2Ev[_ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15condition_errorEEEED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
`.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15condition_errorEEEED2Ev' referenced in section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15condition_errorEEEED1Ev[non-virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::condition_error> >::~clone_impl()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15condition_errorEEEED2Ev[_ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15condition_errorEEEED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
`.text._ZN5boost16exception_detail19error_info_injectorINS_15condition_errorEED2Ev' referenced in section `.text._ZN5boost16exception_detail19error_info_injectorINS_15condition_errorEED1Ev[non-virtual thunk to boost::exception_detail::error_info_injector<boost::condition_error>::~error_info_injector()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail19error_info_injectorINS_15condition_errorEED2Ev[_ZN5boost16exception_detail19error_info_injectorINS_15condition_errorEED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
`.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian8bad_yearEEEED2Ev' referenced in section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian8bad_yearEEEED1Ev[non-virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::gregorian::bad_year> >::~clone_impl()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian8bad_yearEEEED2Ev[_ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian8bad_yearEEEED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
`.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian8bad_yearEEEED2Ev' referenced in section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian8bad_yearEEEED1Ev[non-virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::gregorian::bad_year> >::~clone_impl()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian8bad_yearEEEED2Ev[_ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian8bad_yearEEEED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
`.text._ZN5boost16exception_detail19error_info_injectorINS_9gregorian8bad_yearEED2Ev' referenced in section `.text._ZN5boost16exception_detail19error_info_injectorINS_9gregorian8bad_yearEED1Ev[non-virtual thunk to boost::exception_detail::error_info_injector<boost::gregorian::bad_year>::~error_info_injector()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail19error_info_injectorINS_9gregorian8bad_yearEED2Ev[_ZN5boost16exception_detail19error_info_injectorINS_9gregorian8bad_yearEED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
`.text._ZN5boost16exception_detail19error_info_injectorINS_9gregorian9bad_monthEED2Ev' referenced in section `.text._ZN5boost16exception_detail19error_info_injectorINS_9gregorian9bad_monthEED1Ev[non-virtual thunk to boost::exception_detail::error_info_injector<boost::gregorian::bad_month>::~error_info_injector()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail19error_info_injectorINS_9gregorian9bad_monthEED2Ev[_ZN5boost16exception_detail19error_info_injectorINS_9gregorian9bad_monthEED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
`.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian16bad_day_of_monthEEEED2Ev' referenced in section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian16bad_day_of_monthEEEED1Ev[non-virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::gregorian::bad_day_of_month> >::~clone_impl()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian16bad_day_of_monthEEEED2Ev[_ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian16bad_day_of_monthEEEED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
`.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian16bad_day_of_monthEEEED2Ev' referenced in section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian16bad_day_of_monthEEEED1Ev[non-virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::gregorian::bad_day_of_month> >::~clone_impl()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian16bad_day_of_monthEEEED2Ev[_ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian16bad_day_of_monthEEEED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
`.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorISt13runtime_errorEEED2Ev' referenced in section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorISt13runtime_errorEEED1Ev[non-virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >::~clone_impl()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorISt13runtime_errorEEED2Ev[_ZN5boost16exception_detail10clone_implINS0_19error_info_injectorISt13runtime_errorEEED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
`.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorISt13runtime_errorEEED2Ev' referenced in section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorISt13runtime_errorEEED1Ev[non-virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >::~clone_impl()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorISt13runtime_errorEEED2Ev[_ZN5boost16exception_detail10clone_implINS0_19error_info_injectorISt13runtime_errorEEED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
`.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian9bad_monthEEEED2Ev' referenced in section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian9bad_monthEEEED1Ev[non-virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::gregorian::bad_month> >::~clone_impl()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian9bad_monthEEEED2Ev[_ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian9bad_monthEEEED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
`.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian9bad_monthEEEED2Ev' referenced in section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian9bad_monthEEEED1Ev[non-virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::gregorian::bad_month> >::~clone_impl()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian9bad_monthEEEED2Ev[_ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_9gregorian9bad_monthEEEED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
`.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_21thread_resource_errorEEEED2Ev' referenced in section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_21thread_resource_errorEEEED1Ev[non-virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::thread_resource_error> >::~clone_impl()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_21thread_resource_errorEEEED2Ev[_ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_21thread_resource_errorEEEED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
`.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_21thread_resource_errorEEEED2Ev' referenced in section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_21thread_resource_errorEEEED1Ev[non-virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::thread_resource_error> >::~clone_impl()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_21thread_resource_errorEEEED2Ev[_ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_21thread_resource_errorEEEED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
`.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_10lock_errorEEEED2Ev' referenced in section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_10lock_errorEEEED1Ev[non-virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >::~clone_impl()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_10lock_errorEEEED2Ev[_ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_10lock_errorEEEED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
`.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_10lock_errorEEEED2Ev' referenced in section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_10lock_errorEEEED1Ev[non-virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >::~clone_impl()]' of /usr/local/lib/libboost_thread.a(thread.o): defined in discarded section `.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_10lock_errorEEEED2Ev[_ZN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_10lock_errorEEEED5Ev]' of /usr/local/lib/libboost_thread.a(thread.o)
最佳答案
现在我有点尴尬。显然,我的 boost 库出了点问题。可能,我用一个版本的 gcc 编译它,然后我做了 update all。这可能更新了 GCC,两个版本之间存在某种形式的轻微不兼容。不过,我可能完全错了。
我删除了所有出现的 boost,并从 Archlinux 存储库中提取了 boost,该存储库目前与官方版本是最新的。现在它可以正常编译了。
我傻了。 :(
关于c++ - 异常的 C++ 链接器错误 - 'Defined in discarded section',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9811503/
我正在尝试添加 ace editor到我的应用程序。我从 github 下载它,将“ace/lib/ace”目录放到我的应用程序目录中,包括: " 在我的正文标签中: editor = ace.edi
如果有人能介绍一下 TypeScript 1.8 模块,我将不胜感激。 我有 SomeClass.ts 文件: export class SomeClass { } 然后,在我的 app.ts 中导入
今天,当我阅读php内核代码时,在目录:php5.3/Zend/Zend.h中,有一行代码让我很困惑。 代码如下: /* overloaded elements data types */ #defi
今天看php的内核代码,在php5.3/Zend/Zend.h目录下,有一行代码搞得我一头雾水。 代码如下: /* overloaded elements data types */ #define
我有一个相当大的项目,我试图将所有 JS 文件连接到一个文件中。我已经能够做到这一点,但我在实际将这两个文件实现到代码中时遇到了麻烦。 我的 Gruntfile 有一个执行串联的任务: require
1在以下示例中似乎没有必要(并且可能具有误导性),但是在用于检查 #ifdef 时我已经多次看到这种情况s: #ifndef __NEWLIB_H__ #define __NEWLIB_H__ 1 使
感谢您提供的任何帮助。我有一个 Grails 项目,我正在尝试将 Karma 安装到其中。但是,当我运行时 ./gradlew 构建 我收到以下错误: [x-10-105-56-234]SENG519
我从 Frontend Developer Interview Coding Questions 得到了这个问题.为什么下面的代码片段会打印它打印的内容?我最初认为它会抛出一个 ReferenceEr
之前的问题描述有歧义,所以我在下面修改了一些东西。谢谢。 我想像这样实现一些宏: #define AddVariable(x) \ #define x (++counter) class Ba
我知道我正试图朝自己的腿开枪 ;) 但是,它可以让我使其余(大量)代码更小且更易读。 有什么技巧可以在另一个预处理器宏中创建预处理器宏吗? 这是我正在寻找的示例。我的真实场景更复杂 // That's
在 Microsoft 的 WinDef.h 中引入了几个用于回调的#defines: #ifdef _MAC #define CALLBACK PASCAL #define WINAPI
我知道我想在腿上开枪;)但是,它可以让我使其余(大量)代码更小且更具可读性。 在另一个预处理器宏中创建预处理器宏有什么棘手的方法吗? 这是我正在寻找的示例。我的真实场景更复杂 // That's wh
当我使用这段代码时: #include #define STR(x) #x int main(void) { printf(__FILE__ STR(__LINE__) "hello!\n"
今天的问候, 您好,我是使用 vb 6.0 的初学者。我正在使用以下代码并获得“用户定义类型未定义”。代码在下面。我得到错误的行被突出显示。请帮助。我应该添加一些引用或组件吗?如果是这样,它会是什么。
当我尝试编译此代码时,在 VB6 中出现编译错误“用户定义的类型未定义”。谁能告诉我需要做什么来解决这个错误?以下是我收到错误的行: Public Conn As ADODB.Connection P
我最近将我的应用程序从 Ember 1.3 升级到了 Ember 2.4.2。然而,在使用 ember build --env production 将其部署到我的生产环境后,我注意到了一些问题。 第
这个问题在这里已经有了答案: Getting user-defined type not defined error when running code (2 个回答) 3年前关闭。 我在运行程序以通
在我的一个项目中,我最近进行了重构并重命名了很多。完成此步骤后,一切正常,所有单元测试都通过了,但是我遇到了以下问题。 当我在VBE中执行“编译”时,确实出现了“用户定义的类型未定义”错误,并出现两种
所以我的 Visual Studio 将 tag1 和 tag2 都声明为未定义,但它们的定义很清楚,我不能根据另一个定义一个吗? #define push 99 #de
在 Excel 2007 中,我有以下非常简单的 VBA 代码: Public Type specType sb As Long End Type Private Sub MyButton_C
我是一名优秀的程序员,十分优秀!