Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4878: MinGW 4.5.0 undefined reference to bool interruptible_wait(detail::win32::handle handle_to_wait_for, detail::t imeout target_time)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-08-15 21:02:22
#4878: MinGW 4.5.0 undefined reference to bool
interruptible_wait(detail::win32::handle handle_to_wait_for,detail::t
imeout target_time)
---------------------------------+------------------------------------------
Reporter: 1czajnik@⦠| Owner: anthonyw
Type: Bugs | Status: new
Milestone: To Be Determined | Component: thread
Version: Boost 1.45.0 | Severity: Problem
Resolution: | Keywords:
---------------------------------+------------------------------------------
Description changed by viboes:
Old 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:
> # if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || \
> ( __GNUC__ >= 4 && __GNUC_MINOR >= 5 )
>
> This fix gets rid of the link error, and the earlier warning.
>
> Cheers
New 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:
{{{
# if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || \
( __GNUC__ >= 4 && __GNUC_MINOR >= 5 )
}}}
This fix gets rid of the link error, and the earlier warning.
Cheers
-- -- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4878#comment:8> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:10 UTC