Re: [gtk-list] 'gnome-config --libs gnome' fail



On Wed, 27 Oct 1999, Javi wrote:

> With my new Makefile:  
> 
>   ----------------------------------------
>    # Options
>     CFLAGS      = -Wall -O2
>     GTKCFLAGS   = `gnome-config --cflags gnome`
>     GTKLIBS     = `gnome-config --libs gnome`
>     # Files
>     SCR = hello.c menu.c app.c
>     OBJ = hello.o menu.o app.o
>     # Final executable
>     PROGRAMA = gnome-hello
>     # Rules
>     all: $(PROGRAM)
>     $(PROGRAM): $(OBJ)
>         $(CC) $(CFLAGS) -o $@ $(GTKLIBS) $(OBJ) 
>     hello.o: hello.c
>         $(CC) --version
>         $(CC) $(CFLAGS) $(GTKCFLAGS) -c hello.c
>     menu.o: menu.c menu.h
>         $(CC) $(CFLAGS) $(GTKCFLAGS) -c menu.c
>     app.o: app.c app.h
>         $(CC) $(CFLAGS) $(GTKCFLAGS) -c app.c
>     clean:
>         $(RM) $(OBJ) $(PROGRAM)
>   ----------------------------------------
> 

I had the same problem you seem to have, and I fixed it by doing something
like this:

GTKCFLAGS = `gnome-config --cflags --libs libgnomeui`


But in your case I would say (I'm a newbie myself, so don't take my word
for it) that you're not linking with $(GTKCFLAGS) at all. You've got
$(GTKCFLAGS) a couple of places in your makefile, but only where you're
compiling the source files into object files, not where you're actually
linking together the object files and the libraries.

Hope this solves your problem.


-----
Emil Malmberg
Programmer
Icon Medialab Denmark

+45 3338 1458
emil@iconmedialab.dk
www.iconmedialab.dk



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]