Re: [gtk-list] Re: Re: Can't Run GTK--'s HelloWorld



Eddie Cheng <echeng@holmium.CChem.Berkeley.EDU> writes:
> Last night when I was poking around and then I found this tutorial
> directory itself.  I tried it, and that actually works, both by
> running the shell script and by  running the binary directly in the
>  .libs directory.
> 
> I suspect now that I may not be linking in enough library in my
> own build.  Here is my Makefile:

you should really be using gtkmm-config -script. The tutorial and
examples directory uses different kind of makefile because they need
to work before you've installed gtk--, especially it must not use the
old gtk-- version. Now, if you forget some -I options,
the header files might be got from old installation directory of gtk-- -
or from somewhere else - and wrong compability options will be used.
=> gtkmm-config should be used for your own makefile.

(or if you use automake, use AM_PATH_GTKMM)

> ========================================================
> 
> CC = g++
> INCLUDES = -I /usr/local/lib/Gtk--/include \
>         -I /usr/lib/glib/include
> LIBS = -lgtk -lgdk -lgtkmm -lgdkmm -lglib -rdynamic

CC = g++
INCLUDES = `gtkmm-config --cflags`
LIBS = `gtkmm-config --libs`

> 
> hello:  hello_world.o
>         $(CC) $(LIBS) -o hello hello_world.o
> 
> hello.o:        hello_world.cc
>         $(CC) $(INCLUDES) -c hello_world.cc
> 
> ========================================================
> 
> Did I have everything I need?  :)

dunno - probably nope.

> Also that I don't seem to have the 'ldconfig' command you mentioned
> above.  Where should I go find it?

no idea. (ldconfig comes with most linux boxes..)

-- 
-- Tero Pulkkinen -- terop@modeemi.cs.tut.fi --



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