Compiling with pthreads
David Shaw
dshaw at jabberwocky.com
Thu Mar 12 19:30:58 UTC 2009
Hi,
I've been testing out the cross compiler, and I've come across
something that seems odd.
Using this file:
#include <stdio.h>
#include <pthread.h>
int
main(int argc,char *argv[])
{
printf("Hi there. I'm trying to include pthread.h\n");
return 0;
}
If I compile it with regular old gcc, it works fine, as expected. If
I compile it with the cross compiler, however, I get:
$ i686-pc-mingw32-gcc tester.c
tester.c:2:21: error: pthread.h: No such file or directory
I do have the mingw32-pthreads-2.8.0-4.fc10.noarch package installed.
The issue seems to be that the pthread.h header from that package is:
/usr/i686-pc-mingw32/sys-root/mingw/include/pthread/pthread.h
and not:
/usr/i686-pc-mingw32/sys-root/mingw/include/pthread.h
I can make it work with
"-I/usr/i686-pc-mingw32/sys-root/mingw/include/pthread", of course,
but I wonder if this is something that should just work without
specifying a special include directory.
David
More information about the mingw
mailing list