Modify

Opened 16 years ago

Closed 12 years ago

#91 closed Bugs (None)

boost::threads uses msvc only function?

Reported by: matzebraun Owned by: Roland Schwarz
Milestone: Component: threads
Version: None Severity:
Keywords: Cc:

Description

Hi, I tried compiling boost::thread with cgywin and
mingw, and hit the following problem:
g++ -Wall -I.. -I../include -DBOOST_HAS_WINTHREADS
-I/usr/include/mingw -c thread/thread.cpp -o
thread/thread.o
thread/thread.cpp: In method
`boost::thread::thread(const
boost::function0<void,boost::empty_function_policy,boost::empty_function_mixin,allocator<boost::function_base>
> &)':
thread/thread.cpp:107: implicit declaration of function
`int boost::_beginthreadex(...)'

after looking at some comments in the header files it
seems that this function is only provided by msvcrt.dll
which is != standard win API. Would it be possible to
change the usage here? Or did I miss something?

Greetings,
          Matze

Attachments (0)

Change History (2)

comment:1 Changed 12 years ago by Anthony Williams

Logged In: YES 
user_id=60756

_beginthreadex is indeed part of msvcrt.dll, however
msvcrt.dll is a standard part of newer versions of Windows
(Windows 98 onwards, I believe), and a free download for
older versions.

In the latest version of the w32api headers for mingw, you
will find _beginthreadex declared in process.h. This
function is guarded by #ifdef __MSVCRT__, but that symbol is
defined by default in mingw, so _beginthreadex should be
available.

comment:2 Changed 12 years ago by Roland Schwarz

Status: assignedclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Roland Schwarz.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.