Modify

Ticket #6146 (closed Bugs: duplicate)

Opened 2 years ago

Last modified 2 years ago

MinGW : Compiling / linking with Boost.Thread static library

Reported by: Cyril Othenin-Girard <cog@…> Owned by: anthonyw
Milestone: To Be Determined Component: thread
Version: Boost 1.48.0 Severity: Problem
Keywords: MinGW thread static link Cc:

Description

I compile boost-1.48 with GCC 4.6.1 using MinGW-32 3.10 on Windows XP. I confirm the last comment of WFrane in ticket #4614 :

@gtoknu: This may be too late for you, but adding #define BOOST_THREAD_USE_LIB before the include statements for the boost headers worked for me. I also recompiled the boost libraries after modifying config.hpp in the manner indicated by koradlow in comment 5, but I'm not certain that doing so is necessary.

I built BOOST libraries as static ones.

Nevertheless I have to explicitly add -DBOOST_THREAD_USE_LIB to my project makefile to avoid a lot of warnings like :

boost-1.48/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 [-Wattributes]
boost-1.48/thread/win32/thread_heap_alloc.hpp:69:39: warning: inline function 'void boost::detail::free_raw_heap_memory(void*)' declared as  dllimport: attribute ignored [-Wattributes]

Attachments

Change History

comment:1 Changed 2 years ago by Cyril Othenin-Girard <cog@…>

  • Status changed from new to closed
  • Resolution set to duplicate

Oups ! Wrong quote from ticket #4614. Since I cannot modify this ticket, I will open a new one.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.