Re: missing pthread.h in building 64-bit aaplications
I guess I found the reason why x86_64-w64-mingw32-gcc can't locate pthread.h. It's because a macro #if HAVE_PTHREAD #include is used in source files, but the macro is not defined by mingw, about which I found it existiing before according to google search. I re-built it after the macro was commentted, and pthread.h was in. How is your thinking? Another, I added -v and dependency output showed usr\x86_64-w64-mingw32\sys-root\mingw\include was in. So the search path mechanism is not a problem. JonY-6 wrote: > > On 9/21/2010 08:01, ke...@ca wrote: >> >> Hello All, >> >> Goal: Building 64-bit application on Cygwin >> OS: 64-bit Windows 7 >> >> 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? > > Hi, > > Can you show us the command line used to compile? Add a "-v" as well so > we can see where gcc searched for the headers. > > -- > 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 > > > -- View this message in context: http://old.nabble.com/missing-pthread.h-in-building-64-bit-aaplications-tp29764972p29771871.html Sent from the Cygwin list mailing list archive at Nabble.com. -- 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
Re: missing pthread.h in building 64-bit aaplications
On 9/21/2010 08:01, ke...@ca wrote: Hello All, Goal: Building 64-bit application on Cygwin OS: 64-bit Windows 7 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? Hi, Can you show us the command line used to compile? Add a "-v" as well so we can see where gcc searched for the headers. -- 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
Re: missing pthread.h in building 64-bit aaplications
On Mon, Sep 20, 2010 at 10:38:48PM -0400, Charles Wilson wrote: >On 9/20/2010 10:18 PM, Christopher Faylor wrote: >> On Mon, Sep 20, 2010 at 05:01:52PM -0700, ke...@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. Yeah, duh. I should have picked up on that from the report. Sorry for the noise. cgf -- 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
Re: missing pthread.h in building 64-bit aaplications
On Mon, 2010-09-20 at 17:01 -0700, ke...@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? Keep in mind that the new mingw* compilers are Cygwin-hosted cross-compilers: they use standard *NIX paths. In any case, if mingw64-x86_64-pthreads is installed, then you don't need an -I flag at all; pthread.h should already be in the default search path. Yaakov -- 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
Re: missing pthread.h in building 64-bit aaplications
On 9/20/2010 10:18 PM, Christopher Faylor wrote: > On Mon, Sep 20, 2010 at 05:01:52PM -0700, ke...@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. -- Chuck -- 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
Re: missing pthread.h in building 64-bit aaplications
On Mon, Sep 20, 2010 at 05:01:52PM -0700, ke...@ca wrote: > >Hello All, > >Goal: Building 64-bit application on Cygwin >OS: 64-bit Windows 7 > >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. cgf -- 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
missing pthread.h in building 64-bit aaplications
Hello All, Goal: Building 64-bit application on Cygwin OS: 64-bit Windows 7 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? -- View this message in context: http://old.nabble.com/missing-pthread.h-in-building-64-bit-aaplications-tp29764972p29764972.html Sent from the Cygwin list mailing list archive at Nabble.com. -- 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