missing pthread.h in building 64-bit aaplications

Charles Wilson cygwin@cwilson.fastmail.fm
Tue Sep 21 10:20:00 GMT 2010

On 9/20/2010 10:18 PM, Christopher Faylor wrote:
> On Mon, Sep 20, 2010 at 05:01:52PM -0700, kenny@ca wrote:
>> I used "x86_64-w64-mingw32-gcc ...." to build the application, but failed.
>> The output tells missing pthread.h. pthread.h is included in one of my
>> source files.
>> I located the file, one in C:\cygwin\usr\include, the other
>> C:\cygwin\usr\x86_64-w64-mingw32\sys-root\mingw\include.
>> I tried using -I to tell gcc to include pthread.h, but failed. why? 
> This is a MinGW compiler.  It doesn't support pthread.  Any threading
> support would be with standard Windows calls.

I don't think that's accurate.  The x86_64-mingw64 cross compiler
package set includes a win32-pthreads package, including pthread.h.
It's necessary for gcc's OMP support via libgomp.

That's why the OP was able to find one copy of pthread.h in
C:\cygwin\usr\x86_64-w64-mingw32\sys-root\mingw\include.  The real
question is why the (cross)compiler couldn't locate it; given the whole
/mingw prefix and sysroot support, it really should be able to.


Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

More information about the Cygwin mailing list