MESSAGE
DATE | 2004-08-18 |
FROM | Ruben Safir Secretary NYLXS
|
SUBJECT | Subject: [hangout] Makefile problem
|
I'm trying to use the new GTK 2 C binders and they are now recommending a new scripting tool for the commandline options pkg-config
It's output is as follows on this system:
pkg-config --cflags --libs gtk+-2.0 -I/opt/gnome/include/gtk-2.0 -I/opt/gnome/lib/gtk-2.0/include -I/opt/gnome/include/atk-1.0 -I/opt/gnome/include/pango-1.0 -I/usr/X11R6/include -I/usr/include/freetype2 -I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib/glib-2.0/include -Wl,--export-dynamic -L/opt/gnome/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
So I'm creating a Makefile for a program we are writing and I can't seem to get the libraries to substitute within the Makefile
The Makefile is as follows:
CC=gcc LDLIBS= -Wl,--export-dynamic -L/opt/gnome/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 CFLAGS= -Wall -g -O3 -I/opt/gnome/lib/gtk-2.0/include -I/opt/gnome/include/atk-1.0 -I/opt/gnome/include/pango-1.0 -I/usr/X11R6/include -I/usr/include/freetype2 -I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib/glib-2.0/include INCLUDE= .
clinical: clinical.o calculations.o front.o
clinical.o: clinical.c
front.o: front.c
calculations.o: calculations.c
clinical.c: $(CC) -I$(INCLUDE) $(LDLIBS) $(CFLAGS) -c clinical.c
calculations.c: $(CC) -I$(INCLUDE) $(LDLIBS) $(CFLAGS) -c calculations.c
front.c: $(CC) -I$(INCLUDE) $(LDLIBS) $(CFLAGS) -c front.c
When I run make: I get the following compiler output:
gcc -Wall -g -O3 -I/opt/gnome/lib/gtk-2.0/include -I/opt/gnome/include/atk-1.0 -I/opt/gnome/include/pango-1.0 -I/usr/X11R6/include -I/usr/include/freetype2 -I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib/glib-2.0/include -c -o clinical.o clinical.c
It's missing all the libraries with the result that it can't find the #include file.
Does anyone spot the problem. I was thinking that maybe the comma after -W1 was the problem, but it works on the command line with the following compiler command
gcc -Wall -g -O3 -I/opt/gnome/include/gtk-2.0 -I/opt/gnome/lib/gtk-2.0/include -I/opt/gnome/include/atk-1.0 -I/opt/gnome/include/pango-1.0 -I/usr/X11R6/include -I/usr/include/freetype2 -I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib/glib-2.0/include -Wl,--export-dynamic -L/opt/gnome/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -c -o clinical.o clinical.c
-- __________________________ Brooklyn Linux Solutions
So many immigrant groups have swept through our town that Brooklyn, like Atlantis, reaches mythological proportions in the mind of the world - RI Safir 1998
DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002 http://fairuse.nylxs.com
http://www.mrbrklyn.com - Consulting http://www.inns.net <-- Happy Clients http://www.nylxs.com - Leadership Development in Free Software http://www2.mrbrklyn.com/resources - Unpublished Archive or stories and articles from around the net http://www2.mrbrklyn.com/downtown.html - See the New Downtown Brooklyn....
1-718-382-0585 ____________________________ NYLXS: New Yorker Free Software Users Scene Fair Use - because it's either fair use or useless.... NYLXS is a trademark of NYLXS, Inc
|
|