Need gtk help - compilation does not work
Posted: Sun Feb 01, 2004 6:02 am
Hi!
I just tried to compile some code using gtk+ 1.2.
The only gcc-invocation that compiles the code at all was
but with this configuration i am not able to use the gnome canvas - i get linker-messages like 'undefined reference to gnome_canvas_new'.
Included headers are <gtk/gtk.h> and <gdk/gdk.h>, but this should be irrelevant, after it is a compiler error.
I also tried this comand:
There i got the error: -L/usr/lib/X11R6/lib does not exist
though the directory it is complaining about does exist.
I read all kind of manuals and articles and chapters of books that i have on the topic, but
1. They all use different commands, headerfiles, versions of gtk to compile
2. Not one of them works (i tried all combinations, the two above are just the ones with the least errors).
I would post my code, if it helps, but after i get linker-errors it should be irrelevant - there must be some problem with the libs...
If someone here works with the same version of the library and knows the solution please tell me!
I just tried to compile some code using gtk+ 1.2.
The only gcc-invocation that compiles the code at all was
Code: Select all
gcc (...) `pkg-config --cflags --libs gtk+`
Included headers are <gtk/gtk.h> and <gdk/gdk.h>, but this should be irrelevant, after it is a compiler error.
I also tried this comand:
Code: Select all
gcc(...) `pkg-config --cflags gtk+` \ `pkg-config --libs gtk+`
though the directory it is complaining about does exist.
I read all kind of manuals and articles and chapters of books that i have on the topic, but
1. They all use different commands, headerfiles, versions of gtk to compile
2. Not one of them works (i tried all combinations, the two above are just the ones with the least errors).
I would post my code, if it helps, but after i get linker-errors it should be irrelevant - there must be some problem with the libs...
If someone here works with the same version of the library and knows the solution please tell me!