On Tue, 2012-02-28 at 07:49 +0100, Axel Simon wrote:

> > Preprocessing library pango-0.12.2...
> > Graphics\Rendering\Pango\Structs.hsc:25:27: fatal error:
> > glib-2.0/glib.h: No such file or directory
> 
> Uh? This is odd...
> > compilation terminated.
> > compiling dist\build\Graphics\Rendering\Pango\Structs_hsc_make.c
> > failed (exit code 1)
> > command was: C:\ghc\ghc-7.4.1\mingw\bin\gcc.exe -c
> > dist\build\Graphics\Rendering\Pango\Structs_hsc_make.c -o
> > dist\build\Graphics\Rendering\Pango\Structs_hsc_make.o
> > -Wl,--hash-size=31 -Wl,--reduce-memory-overheads
> > -D__GLASGOW_HASKELL__=704 -Dmingw32_BUILD_OS -Dmingw32_HOST_OS
> > -Di386_BUILD_ARCH -Di386_HOST_ARCH -Idist\build\autogen -Idist\build
> > -I. -Ic:/gtk/include/pango-1.0 -Ic:/gtk/include/glib-2.0
> 
> since the paths are there. Should we state "glib.h" only rather than  
> "glib-2.0/glib.h"?
> That's not quite the convention of Gtk+, though.

Hi Daniel, Axel,

Yes. I just bumped into this just now (trying to help some people who
were having problems installing ThreadScope on Windows).

I arrived at the same conclusion as Axel before reading this thread. It
should only be <glib.h>. If you look at the glib and gtk developer
documentation you'll see that they say:
#include <glib.h>
but
#include <gtk/gtk.h>

So yes it's a slightly different convention, but that's the way it is.
It happened to work on Linux systems because for glib-2.x, the header
files are installed at /usr/include/glib-2.0/glib.h so doing #include
<glib-2.0/glib.h> would happen to work.

But if you install glib devel files into a free standing location (as we
do on Windows) then this mistake is shown up. It's also pretty clear if
you look at the layout of the header files and what pkg-config --cflags
glib-2.0 reports.

Since the analysis seems pretty clear, and it does actually fix the
build for me on windows I've taken the liberty of pushing the patch.

Duncan


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Gtk2hs-devel mailing list
Gtk2hs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel

Reply via email to