X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Message-ID: <4C981AB8.8020602@cwilson.fastmail.fm> Date: Mon, 20 Sep 2010 22:38:48 -0400 From: Charles Wilson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: missing pthread.h in building 64-bit aaplications References: <29764972 DOT post AT talk DOT nabble DOT com> <20100921021846 DOT GB13592 AT ednor DOT casa DOT cgf DOT cx> In-Reply-To: <20100921021846.GB13592@ednor.casa.cgf.cx> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On 9/20/2010 10:18 PM, Christopher Faylor wrote: > On Mon, Sep 20, 2010 at 05:01:52PM -0700, kenny AT 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