LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   gtkglarea compiling program problem (https://www.linuxquestions.org/questions/linux-software-2/gtkglarea-compiling-program-problem-303175/)

vas_dee 03-18-2005 09:50 AM

gtkglarea compiling program problem
 
Hi,
i have downloaded and installed the gtkglarea rpm (version 1.2.2). When i try and compile one of the example programs i get the following error.

Code:

make
gcc  simple.c -o simple `pkg-config --cflags gtk+-2.0 --libs` -Wl,-rpath,/usr/lib -lgtkgl -lGLU -lGL
/usr/lib/gcc/i386-redhat-linux/3.4.2/../../../libgtkgl.so: undefined reference to `gtk_type_is_a'
/usr/lib/gcc/i386-redhat-linux/3.4.2/../../../libgtkgl.so: undefined reference to `gtk_widget_pop_visual'
/usr/lib/gcc/i386-redhat-linux/3.4.2/../../../libgtkgl.so: undefined reference to `gdk_pixmap_ref'
/usr/lib/gcc/i386-redhat-linux/3.4.2/../../../libgtkgl.so: undefined reference to `gdk_pixmap_unref'
/usr/lib/gcc/i386-redhat-linux/3.4.2/../../../libgtkgl.so: undefined reference to `gdk_window_get_type'
/usr/lib/gcc/i386-redhat-linux/3.4.2/../../../libgtkgl.so: undefined reference to `gtk_type_check_object_cast'
/usr/lib/gcc/i386-redhat-linux/3.4.2/../../../libgtkgl.so: undefined reference to `gtk_type_check_class_cast'
/usr/lib/gcc/i386-redhat-linux/3.4.2/../../../libgtkgl.so: undefined reference to `gtk_widget_push_visual'
collect2: ld returned 1 exit status
make: *** [simple] Error 1

After viewing another thread, http://mail.gnome.org/archives/gtk-a.../msg00296.html

my feeling is the problem could be solved by updating gtkglarea, however when i try and install the latest rpm it spits back that OpenGL isn't installed :S This can't be right since i can compile and run other opengl programs.

Could this be a linking problem? Anyone have any suggestions? I am running FC3 and the latest xorg drivers from ati if that helps...

I downloaded a precompiled version of the program i am trying to compile (simple.c - an example gtkglarea program ) and i ran "ldd simple" to determine what libraries it is linking to. Turns out that it is linking to "libgtkgl.so.5" whereas my problem seems to stem from "libgtkgl.so". Not sure if this helps any, but thought i'd add it anyways.

Many Thanks!

vas_dee 03-18-2005 10:02 PM

my girlfriend knows more about linux than me.. even though i profess to be a linux guru. it took her 2 mins to figure out the problem :P

http://ftp.linux.org.uk/mirrors/ftp....tkglarea/1.99/

./configure
make
make install

My question is this. How do i compile a gtkglarea program on the command line? what flags do i need to include?

__J 03-19-2005 05:23 AM

if you did ./configure, make, make install, by default this installs it in the prefix /usr/local. check /usr/local/doc for a gtkglarea directory conaining documentation on it's use ( not all apps/libs do this, so there may be nothing there).

If you cannot find any documentation, you'll need to find out what implementation the library uses to pass the flags back to the compiler. There are several implementations out there, some being config scripts ( like the gtk-config or glib-config for the older gnome libraries), pkg-config ( all the newer ( 2.x) gnome libraries use this method, as well as some other libs), and manually passing the flags to the compiler. Since it's using gtk, check /usr/local/lib/pkgconfig for a gtkglarea.pc file ( or something similar) which would be the pkg-config system.


All times are GMT -5. The time now is 07:08 AM.