Re: [GtkGLExt] Compile error "virtual thunk"



Well, I've recompiled glibc, glib, gtk+, gtkmm, gtkglext, and gtkglextmm (whew!). I'm still having problems.

With my library, I have the build set up so that I can either compile the library, or compile a test program. The test program links all the object files in directly, so it doesn't use the library as a library. I can compile the library, but not a test program.

Below shows how I am compiling and linking. I have a number of other compile steps, but each uses the exact same flags as the one below.

I guess my next step is to create a small sample program that uses the Gtk::GL::DrawingArea, and see what is the smallest program that I can create that has this problem.

g++ -c $(pkg-config gtkmm-2.0 gtkglextmm-1.2 --cflags) -Isrc -ggdb3 -fno-inline test/color_dialog_test.cpp -o ./color_dialog_test.o g++ $(pkg-config gtkmm-2.0 gtkglextmm-1.2 --libs) -o ./color_dialog_test ./debug_angles3d.o ./debug_color.o ./debug_color_dialog.o ./debug_color_dialog_impl.o ./debug_evaluator.o ./debug_gradient.o ./debug_gradient_dialog.o ./debug_gradient_dialog_impl.o ./debug_interpolate.o ./debug_interpolate_vbox.o ./debug_interpolate_graph.o ./debug_scrollbar.o ./debug_trough.o ./color_dialog_test.o ./debug_angles3d.o:(.gnu.linkonce.r._ZTCN8gtkbonus12light_sphereE0_N3Gtk2GL11DrawingAreaE+0x16c): undefined reference to `virtual thunk [v:0,-24] to Gtk::GL::DrawingArea::~DrawingArea [in-charge]()' ./debug_angles3d.o:(.gnu.linkonce.r._ZTCN8gtkbonus12light_sphereE0_N3Gtk2GL11DrawingAreaE+0x170): undefined reference to `virtual thunk [v:0,-24] to Gtk::GL::DrawingArea::~DrawingArea [in-charge deleting]()'
collect2: ld returned 1 exit status


Timothy M. Shead wrote:
On Sun, 2006-08-13 at 19:15 -0400, jlm wrote:

I am upgrading from gtkglextmm 1.1.0 to 1.2.0. I believe I have made all of the necessary changes to my code, but when I link I get this error:

/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../libgtkbonus.so: undefined reference to `virtual thunk [v:0,-24] to Gtk::GL::DrawingArea::~DrawingArea [in-charge]()' /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../libgtkbonus.so: undefined reference to `virtual thunk [v:0,-24] to Gtk::GL::DrawingArea::~DrawingArea [in-charge deleting]()'

Now I have a library (libgtkbonus) that uses gtkglextmm, as well as the main program. In the library I use the Gtk::GL::DrawingArea, but not in the main program. I have compaired my use of this widget to that in simple-darea.cc, and can find only one difference. The Gtk::GL::DrawingArea in simple-darea.cc is initialized with a "config" parameter, and mine is not. I have my glconfig code inside the sub-class' constructor.


I'm not familiar with the error message, but weird linker problems with
C++ libraries are usually caused by trying to link together binaries
that have been built with different versions of gcc.  Make sure that all
of the libraries that you are linking and your application are all built
with the same gcc.

Tim


_______________________________________________
gtkglext-list mailing list
gtkglext-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkglext-list




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