Opened 12 years ago
Last modified 9 years ago
#4878 closed Bugs
MinGW 4.5.0 undefined reference to bool interruptible_wait(detail::win32::handle handle_to_wait_for,detail::t imeout target_time) — at Initial Version
Reported by: | Owned by: | Anthony Williams | |
---|---|---|---|
Milestone: | Boost 1.54.0 | Component: | thread |
Version: | Boost 1.53.0 | Severity: | Problem |
Keywords: | Cc: | admin@…, kevin.brightwell2@… |
Description
test.cpp: #include <boost/thread.hpp> int main() {
boost::this_thread::sleep( boost::get_system_time() +
boost::posix_time::milliseconds(50) );
}
g++ -lboost_thread-mt: In file included from C:/boost/include/boost-1_45_0/boost/thread/win32/thread_data.hpp:12:0,
from C:/boost/include/boost-1_45_0/boost/thread/thread.hpp:15, from C:/boost/include/boost-1_45_0/boost/thread.hpp:13, from test.cpp:8:
C:/boost/include/boost-1_45_0/boost/thread/win32/thread_heap_alloc.hpp:59:40: warning: inline function 'void* boost::detail::allocate_raw_heap_memory(unsigned int)' declared as dllimport: attribute ignored C:/boost/include/boost-1_45_0/boost/thread/win32/thread_heap_alloc.hpp:69:39: warning: inline function 'void boost::detail::free_raw_heap_memory(void*)' declared as dllimport: attribute ignored c:/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/bin/ld.exe: warning: auto-importing has been activated without --enable-auto-import specified on the command line. This should work unless it involves constant data structures referencing symbols from auto-imported DLLs. C:\DOCUME~1\ADMINI~1\USTAWI~1\Temp\ccW8Zsal.o:test.cpp:(.text$_ZN5boost11this_thread18interruptible_waitERKNS_10posix_time5ptimeE[boost::this_thread::interruptible_wait(boost::posix_time::ptime const&)]+0x37): undefined reference to `_imp_ZN5boost11this_thread18interruptible_waitEPvNS_6detail7timeoutE' collect2: ld returned 1 exit status
I have fixed this, but I do not know, if it is the right way: boost/thread/detail/config.hpp line 40:
defined(BOOST_INTEL_WIN) |
( GNUC >= 4 && GNUC_MINOR >= 5 )
This fix gets rid of the link error, and the earlier warning.
Cheers