This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC programming: header pthread not found but installed

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 <>. 
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.


Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]