[gtkmm] gtkmm-2.4.2 on win32



We are in the process of moving the K-3D 3D modeling and animation system (www.k-3d.org) from a gtk1 UI to gtkmm 2.4. Everything has been working great on GNU/Linux, and now I'm trying to get a Win32 build going under Cygwin.

I've installed gtk-2.0 using the recommended gladewin32 installer, then installed gtkmm 2.4 using Cedric's installer. I specified c:/cygwin/usr/local as the install directory for both installers.

I then verified that I was able to build and run several gtkmm samples using "traditional" command lines, e.g.

$ gcc -o helloworld *.cc `pkg-config --cflags --libs gtkmm-2.4` -lstdc++

... gotta love it! Building K-3D however, I'm seeing several link errors, at the end of this post. What's interesting is that every error corresponds to a place where I had to fall-back on some gtk / gdk functionality in the code (we're using gtkglext, as gtkglextmm has not caught-up with gtkmm 2.4). As a simple example, the following line in the code:

  GtkWidget* const widget = GTK_WIDGET(gobj());

produces a link error:

  radial_menu.cpp:153: undefined reference to `_gtk_widget_get_type'

and

  g_return_if_fail(wwindow);

leads to:

  interactive.cpp:70: undefined reference to `_g_log'
	
Look familiar to anyone?

Thanks in advance,
Tim Shead





/bin/bash ../libtool --mode=link g++ -Wall -Wno-ctor-dtor-privacy -mms-bitfields -g -no-undefined -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -o libk3dngui.la -rpath /usr/local/k3d/lib about_box.lo button.lo check_button.lo check_menu_item.lo command_node_inspector.lo document_window.lo image_menu_item.lo image_toggle_button.lo interactive.lo label.lo main_document_window.lo menubar.lo menu_item.lo panel_container.lo radial_menu.lo screen_overlay.lo splash_box.lo statusbar.lo toggle_button.lo toolbar.lo toolbutton.lo tutorial_menu.lo tutorial_message.lo tutorial_recorder.lo user_interface.lo ui_component.lo utility.lo viewport.lo window.lo ../k3dsdk/libk3dsdk.la ../boost/libs/regex/src/libregexpp.la -LC:/cygwin/usr/local/lib -lgtkmm-2.4 -lgdkmm-2.4 -latkmm-1.6 -lgtk-win32-2.0 -lpangomm-1.4 -lglibmm-2.4 -lsigc-2.0 -lgdk-win32-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv -LC:/cygwin/usr/local/lib -lgtkglext-win32-1.0 -lgdkglext-win32-1.0 -lglu32 -lopengl32 -luser32 -lkernel32 -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv -lglibmm_generate_extra_defs-2.4
rm -fr  .libs/libk3dngui.dll.a
g++ -shared -nostdlib /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/crtbegin.o .libs/about_box.o .libs/button.o .libs/check_button.o .libs/check_menu_item.o .libs/command_node_inspector.o .libs/document_window.o .libs/image_menu_item.o .libs/image_toggle_button.o .libs/interactive.o .libs/label.o .libs/main_document_window.o .libs/menubar.o .libs/menu_item.o .libs/panel_container.o .libs/radial_menu.o .libs/screen_overlay.o .libs/splash_box.o .libs/statusbar.o .libs/toggle_button.o .libs/toolbar.o .libs/toolbutton.o .libs/tutorial_menu.o .libs/tutorial_message.o .libs/tutorial_recorder.o .libs/user_interface.o .libs/ui_component.o .libs/utility.o .libs/viewport.o .libs/window.o -Wl,--whole-archive ../boost/libs/regex/src/.libs/libregexpp.a -Wl,--no-whole-archive -L/usr/lib -LC:/cygwin/usr/local/lib -L/home/tshead/k3d/sdpgl/.libs ../k3dsdk/.libs/libk3dsdk.dll.a -lgtkmm-2.4 -lgdkmm-2.4 -latkmm-1.6 -lpangomm-1.4 -lglibmm-2.4 -lsigc-2.0 -lgtkglext-win32-1.0 -lgdkglext-win32-1.0 -lglu32 -lopengl32 -luser32 -lkernel32 -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 /usr/lib/libintl.dll.a /usr/lib/libiconv.dll.a -lglibmm_generate_extra_defs-2.4 -L/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1 -L/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../.. -lstdc++ -lgcc -lcygwin -luser32 -lkernel32 -ladvapi32 -lshell32 -lgcc /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/crtend.o -mms-bitfields -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -o .libs/cygk3dngui-0.dll -Wl,--image-base=0x10000000 -Wl,--out-implib,.libs/libk3dngui.dll.a
Creating library file: .libs/libk3dngui.dll.a
.libs/interactive.o(.text+0x198): In function `_ZN10libk3dngui11interactive6detail12warp_pointerEN4Glib6RefPtrIN3Gdk6WindowEEEN3k3d7vector2E': /home/tshead/k3d/ngui/interactive.cpp:69: undefined reference to `_gdk_win32_drawable_get_handle' .libs/interactive.o(.text+0x1df):/home/tshead/k3d/ngui/interactive.cpp:70: undefined reference to `_g_log' .libs/main_document_window.o(.text$_ZN4Glib10ListHandleIPN3Gtk6WidgetENS_17Container_Helpers10TypeTraitsIS3_EEED1Ev+0x49): In function `_ZN4sigc10visit_eachINS_8internal20limit_derived_targetIPNS_9trackableENS1_12slot_do_bindEEEvN10libk3dngui6detail20main_document_windowESsEEvRKT_RKNS_18bound_mem_functor1IT0_T1_T2_EE': C:/cygwin/usr/local/include/sigc++-2.0/sigc++/visit_each.h: undefined reference to `_g_list_free' .libs/main_document_window.o(.text$_ZN4Glib17Container_Helpers10TypeTraitsIPN3Gtk6WidgetEE14release_c_typeEP10_GtkWidget+0xd):C:/cygwin/usr/local/include/sigc++-2.0/sigc++/visit_each.h: undefined reference to `_g_object_unref' .libs/radial_menu.o(.text+0x485): In function `_ZN10libk3dngui11radial_menu7control22on_popup_menu_positionERiS2_Rb': /home/tshead/k3d/ngui/radial_menu.cpp:86: undefined reference to `_gdk_window_get_pointer' .libs/radial_menu.o(.text+0x945): In function `_ZN10libk3dngui11radial_menu7control16on_size_allocateERN3Gdk9RectangleE': /home/tshead/k3d/ngui/radial_menu.cpp:153: undefined reference to `_gtk_widget_get_type' .libs/radial_menu.o(.text+0x95e):/home/tshead/k3d/ngui/radial_menu.cpp:153: undefined reference to `_g_type_check_instance_cast' .libs/radial_menu.o(.text+0x9fd):/home/tshead/k3d/ngui/radial_menu.cpp:163: undefined reference to `_gdk_window_move_resize' .libs/radial_menu.o(.text+0xd46): In function `_ZN10libk3dngui11radial_menu7control10on_realizeEv': /home/tshead/k3d/ngui/radial_menu.cpp:201: undefined reference to `_gtk_menu_get_type' .libs/radial_menu.o(.text+0xd73):/home/tshead/k3d/ngui/radial_menu.cpp:201: undefined reference to `_g_type_check_instance_cast' .libs/radial_menu.o(.text+0x170e): In function `_ZN10libk3dngui11radial_menu7control15on_expose_eventEP15_GdkEventExpose': /home/tshead/k3d/ngui/radial_menu.cpp:246: undefined reference to `_gtk_widget_get_type' .libs/radial_menu.o(.text+0x1727):/home/tshead/k3d/ngui/radial_menu.cpp:246: undefined reference to `_g_type_check_instance_cast' .libs/radial_menu.o(.text+0x18cd):/home/tshead/k3d/ngui/radial_menu.cpp:259: undefined reference to `_gtk_paint_box' .libs/radial_menu.o(.text+0x1936): In function `_ZN10libk3dngui11radial_menu7control17get_selected_itemEv': /home/tshead/k3d/ngui/radial_menu.cpp:281: undefined reference to `_gdk_window_get_pointer' .libs/radial_menu.o(.text$_ZN4Glib17List_Cpp_IteratorI12_GtkMenuItemN3Gtk8MenuItemEEppEv+0x1e): In function `_ZNSt8_Rb_treeIPN3Gtk8MenuItemESt4pairIKS2_dESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE5eraseESt17_Rb_tree_iteratorIS5_RS5_PS5_ESF_': /usr/include/c++/3.3.1/bits/stl_tree.h: undefined reference to `_g_list_first' .libs/viewport.o(.text+0x558): In function `_ZN10libk3dngui8viewport7controlC2ERN3k3d9idocumentERNS2_13icommand_nodeERKSsPNS2_9iviewportE': /home/tshead/k3d/ngui/viewport.cpp:1156: undefined reference to `_gtk_widget_get_type' .libs/viewport.o(.text+0x585):/home/tshead/k3d/ngui/viewport.cpp:1156: undefined reference to `_g_type_check_instance_cast' .libs/viewport.o(.text+0xd6f): In function `_ZN10libk3dngui8viewport7controlC1ERN3k3d9idocumentERNS2_13icommand_nodeERKSsPNS2_9iviewportE': /home/tshead/k3d/ngui/viewport.cpp:1156: undefined reference to `_gtk_widget_get_type' .libs/viewport.o(.text+0xd9c):/home/tshead/k3d/ngui/viewport.cpp:1156: undefined reference to `_g_type_check_instance_cast' .libs/viewport.o(.text+0x2d19): In function `_ZN10libk3dngui8viewport7control10save_frameERKN5boost10filesystem4pathEb': /home/tshead/k3d/ngui/viewport.cpp:1244: undefined reference to `_gtk_widget_get_type' .libs/viewport.o(.text+0x2d3c):/home/tshead/k3d/ngui/viewport.cpp:1244: undefined reference to `_g_type_check_instance_cast' .libs/viewport.o(.text+0x2d56):/home/tshead/k3d/ngui/viewport.cpp:1244: undefined reference to `_g_type_check_instance_cast' .libs/viewport.o(.text+0x2e0b):/home/tshead/k3d/ngui/viewport.cpp:1247: undefined reference to `_gtk_widget_get_type' .libs/viewport.o(.text+0x2e38):/home/tshead/k3d/ngui/viewport.cpp:1247: undefined reference to `_g_type_check_instance_cast' .libs/viewport.o(.text+0x3903): In function `_ZN10libk3dngui8viewport7control9on_redrawEv': /home/tshead/k3d/ngui/viewport.cpp:1391: undefined reference to `_gtk_widget_get_type' .libs/viewport.o(.text+0x3926):/home/tshead/k3d/ngui/viewport.cpp:1391: undefined reference to `_g_type_check_instance_cast' .libs/viewport.o(.text+0x3940):/home/tshead/k3d/ngui/viewport.cpp:1391: undefined reference to `_g_type_check_instance_cast' .libs/viewport.o(.text+0x39f5):/home/tshead/k3d/ngui/viewport.cpp:1394: undefined reference to `_gtk_widget_get_type' .libs/viewport.o(.text+0x3a22):/home/tshead/k3d/ngui/viewport.cpp:1394: undefined reference to `_g_type_check_instance_cast'
collect2: ld returned 1 exit status



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