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




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

>Check that the include directories from gtkmm-config --cflags really go to
>the compilation line! it does seem to -I the correct dirs with
>that command. => maybe the compiler never gets the output of
>gtkmm-config? (check that you used `gtkmm-config --cflags`, instead
>of 'gtkmm-config --cflags'  in your compilation line.

Guillaume wrote:

>which is quite strange since the directory they are in
>(/usr/local/lib/Gtk--/include/) is among your include path.

>So it looks like your makefile is screwed up somehow, and you're not
>passing the flags you think you are to g++.

Argh!  Indeed, I was not paying attention to the printout of my
make process.  It looks like my Makefile is screwed up as it did not
get any flags from the command.

But when I throw away the Makefile and do it on command line, I 
did get it compiled, and then ran into my original problem right away:

====================================================
[echeng@localhost tutorial]$ 
[echeng@localhost tutorial]$ g++ -o hello hello_world.cc `gtkmm-config --cflags` `gtkmm-config --libs`               
[echeng@localhost tutorial]$ lt
total 102
-rwxrwxr-x   1 echeng   echeng      47740 Feb  8 10:48 hello*
-rw-rw-r--   1 echeng   echeng        247 Feb  4 10:52 Makefile
-rw-rw-r--   1 echeng   echeng       3044 Feb  4 10:27 hello_world.cc
-rw-rw-r--   1 echeng   echeng      49264 Feb  2 20:31 hello_world.o
[echeng@localhost tutorial]$ hello
hello: error in loading shared libraries
libgtkmm-1.1.so.4: cannot open shared object file: No such file or directory
[echeng@localhost tutorial]$
[echeng@localhost tutorial]$ lt /usr/local/lib
total 36529
drwxrwxr-x   3 root     root         1024 Jan 27 18:32 Gtk--/
-rw-r--r--   1 root     root      2077758 Jan 27 18:32 libgtkmmdraw.a
-rw-r--r--   1 root     root       738134 Jan 27 18:32 libgtkmmdraw.so.0.0.0
lrwxrwxrwx   1 root     root           21 Jan 27 18:32 libgtkmmdraw.so.0 -> libgtkmmdraw.so.0.0.0
lrwxrwxrwx   1 root     root           21 Jan 27 18:32 libgtkmmdraw.so -> libgtkmmdraw.so.0.0.0
-rw-r--r--   1 root     root          582 Jan 27 18:32 libgtkmmdraw.la
-rw-r--r--   1 root     root     26912694 Jan 27 18:32 libgtkmm.a
lrwxrwxrwx   1 root     root           21 Jan 27 18:31 libgtkmm.so -> libgtkmm-1.1.so.4.0.0
-rw-r--r--   1 root     root          566 Jan 27 18:31 libgtkmm.la
-rw-r--r--   1 root     root      4870939 Jan 27 18:31 libgtkmm-1.1.so.4.0.0
lrwxrwxrwx   1 root     root           21 Jan 27 18:31 libgtkmm-1.1.so.4 -> libgtkmm-1.1.so.4.0.0
-rw-r--r--   1 root     root      1874000 Jan 27 18:31 libgdkmm.a
lrwxrwxrwx   1 root     root           21 Jan 27 18:31 libgdkmm-1.1.so.0 -> libgdkmm-1.1.so.0.0.0
lrwxrwxrwx   1 root     root           21 Jan 27 18:31 libgdkmm.so -> libgdkmm-1.1.so.0.0.0
-rw-r--r--   1 root     root          487 Jan 27 18:31 libgdkmm.la
-rw-r--r--   1 root     root       771987 Jan 27 18:31 libgdkmm-1.1.so.0.0.0
[echeng@localhost tutorial]$ 
====================================================

Thanks again for staying with me.  I am learning the process and
I am learning a great deal here.


    Eddie



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