hazel
December 9th, 2007, 07:03 PM
I use a simple makefile for compiling test programs containing lines like:
gcc program.c -o program `pkg-config gtk+-2.0 --cflags --libs`
This worked perfectly well in Red Hat but when I do it in Ubuntu, it says it can't find the included header <gtk/gtk.h>, although pkg-config correctly reports /usr/include/gtk+-2.0 as one of the directories that should be searched for headers. Of course this means that none of my gtk functions is recognised and the compilation aborts with reams of error messages.
The strange thing is that if I copy the offending line and paste it into bash, it works normally. Obviously this is a work-around that can't easily be used with complicated multi-file programs. I have googled but can't find any reports of people having similar problems.
I am using make 3.81beta4.
gcc program.c -o program `pkg-config gtk+-2.0 --cflags --libs`
This worked perfectly well in Red Hat but when I do it in Ubuntu, it says it can't find the included header <gtk/gtk.h>, although pkg-config correctly reports /usr/include/gtk+-2.0 as one of the directories that should be searched for headers. Of course this means that none of my gtk functions is recognised and the compilation aborts with reams of error messages.
The strange thing is that if I copy the offending line and paste it into bash, it works normally. Obviously this is a work-around that can't easily be used with complicated multi-file programs. I have googled but can't find any reports of people having similar problems.
I am using make 3.81beta4.