This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
Re: Missing libs when compiling GTK+ code
Radek Vokal wrote:
> I think I do sth wrong. I started with helloword example trying to
> compile it with
>
> gcc -mms-bitfields -mno-cygwin -mwindows helloworld.c -o
> helloworld.exe `pkg-config --cflags gtk+-2.0` `pkg-config --libs
> gtk+-2.0`
>
> but I get several errors starting with
>
> helloword.c:1:21: gtk/gtk.h: No such file or directory
>
> which looks really supicious. When I try to locate gtk.h file I find it in
> /usr/include/gtk-1.2/gtk/gtk.h
> /usr/include/gtk-2.0/gtk/gtk.h
That's because you're using -mno-cygwin. That flag essentially turns
gcc into mingw, and none of the Cygwin libraries or headers are in the
search path for mingw. They wouldn't work even if they were because
they all depend on cygwin1.dll. A cygwin-ported library is of no use if
you're using mingw.
Brian