This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: GCC programming: header pthread not found but installed
- From: Brian Dessent <brian at dessent dot net>
- To: cygwin at cygwin dot com
- Date: Sun, 09 Jul 2006 12:10:15 -0700
- Subject: Re: GCC programming: header pthread not found but installed
- References: <44B1513A.6010007@web.de>
- Reply-to: cygwin at cygwin dot com
Serethos wrote:
> fails with a gcc call like:
> gcc test.c -lpthread
>
> with the
> error: pthread.h: no such file or directory
The testcase compiles just fine for me with no errors. Please review
the problem reporting guidelines at <http://cygwin.com/problems.html>.
You did not provide the requested cygcheck output, and so there is not
enough information in your message to be of any more help. As a guess I
would have to say that you're not using Cygwin's gcc due to some other
gcc being in the path, but that's just pure speculation.
By the way, including "-lpthread" is not necessary and serves no
purpose. All of the pthread support is in -lcygwin (cygwin1.dll), which
gets linked against by the gcc specs file regardless of what options you
use (except of course for -mno-cygwin.) There is no such separate
"pthreads library" as on unix, and libpthread.a is provided just so that
Makefiles that expect to be able to specify -lpthread continue to work,
but it is not necessary and serves no useful purpose.
Brian
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/