Opened 17 years ago

Closed 13 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:


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.cpp: In method
> &)':
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?


Change History (2)

comment:1 Changed 13 years ago by Anthony Williams

Logged In: YES 

_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

comment:2 Changed 13 years ago by Roland Schwarz

Status: assignedclosed
Note: See TracTickets for help on using tickets.