I managed to get the program to link by adding "-lgtkmm -lgdkmm" after the `wx-config --libs` argument. I'm not sure if this is a problem with the wxgtk-2.1 package or C librariy dependencies. What needs to be done to get this to work out of the box ?
Brendan. Brendan Simon wrote: > I have a couple of questions regarding the maintenence of the Debain > wxWindows package. > 1) Is it actively maintained and who is the maintainer ? > 2) wxWindows-2.1.15 has been released and was wondering if a Debian > package is in the pipeline. > 3) I have a linking problem with an existing wx application that I > compiled with wxWindows 2.0 on a RedHat5.2 system. (see below). > > Thanks, > Brendan Simon. > > I have installed wxgtk-2.1 and tried to compile a program I had working > with wxWindowsGtk 2.0. > After some changes to my makefiles, I finally got it to compile but it > failed during the link. > This is the error message: > g++ `wx-config --libs` -o wxcvs > /usr/bin/ld: cannot find -lgmodule > collect2: ld returned 1 exit status > > Note that `wx-config --libs` yields: > -lwx_gtk -ldl -lpthread -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk > -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm > > I went to /usr/lib and found that libgmodule.so did not exist. So I did > the following. > ln -s libgmodule-1.2.so.0.0.7 libgmodule.so > > and now I get the following error: > g++ `wx-config --libs` -o wxcvs > /usr/lib/libwx_gtk.so: undefined reference to > `gdk_window_get_root_origin' > /usr/lib/libwx_gtk.so: undefined reference to > `gtk_item_factory_create_item' > /usr/lib/libgmodule.so: undefined reference to > `g_thread_use_default_impl' > /usr/lib/libwx_gtk.so: undefined reference to `gtk_drag_finish' > /usr/lib/libwx_gtk.so: undefined reference to > `gtk_handle_box_set_shadow_type' > /usr/lib/libwx_gtk.so: undefined reference to > `gtk_notebook_get_current_page' > /usr/lib/libgmodule.so: undefined reference to > `g_static_private_set' > /usr/lib/libwx_gtk.so: undefined reference to > `gtk_toggle_button_set_active' > /usr/lib/libwx_gtk.so: undefined reference to `gdk_keyval_to_upper' > /usr/lib/libwx_gtk.so: undefined reference to > `gtk_notebook_page_num' > /usr/lib/libwx_gtk.so: undefined reference to `gdk_threads_mutex' > /usr/lib/libwx_gtk.so: undefined reference to > `gtk_selection_add_target' > /usr/lib/libwx_gtk.so: undefined reference to `gtk_accel_group_new' > /usr/lib/libwx_gtk.so: undefined reference to `gtk_drag_get_data' > /usr/lib/libwx_gtk.so: undefined reference to `gtk_container_forall' > > /usr/lib/libwx_gtk.so: undefined reference to `gtk_target_list_new' > /usr/lib/libwx_gtk.so: undefined reference to > `gtk_font_selection_dialog_get_font' > /usr/lib/libwx_gtk.so: undefined reference to > `gtk_window_set_transient_for' > /usr/lib/libwx_gtk.so: undefined reference to > `gtk_tooltips_force_window' > /usr/lib/libwx_gtk.so: undefined reference to `gtk_drag_begin' > /usr/lib/libwx_gtk.so: undefined reference to > `g_threads_got_initialized' > /usr/lib/libwx_gtk.so: undefined reference to > `gtk_button_set_relief' > /usr/lib/libwx_gtk.so: undefined reference to `gtk_item_factory_new' > > /usr/lib/libwx_gtk.so: undefined reference to > `gtk_accel_group_detach' > /usr/lib/libwx_gtk.so: undefined reference to > `gtk_font_selection_dialog_get_font_name' > /usr/lib/libwx_gtk.so: undefined reference to > `gtk_widget_get_child_requisition' > /usr/lib/libwx_gtk.so: undefined reference to > `gtk_accel_label_refetch' > /usr/lib/libwx_gtk.so: undefined reference to > `gtk_item_factory_get_widget' > /usr/lib/libwx_gtk.so: undefined reference to > `gtk_widget_set_app_paintable' > /usr/lib/libwx_gtk.so: undefined reference to > `gtk_font_selection_dialog_new' > /usr/lib/libwx_gtk.so: undefined reference to `gdk_gc_set_dashes' > /usr/lib/libwx_gtk.so: undefined reference to > `gtk_container_set_border_width' > /usr/lib/libwx_gtk.so: undefined reference to `gdk_drag_status' > /usr/lib/libwx_gtk.so: undefined reference to > `gdk_window_set_static_gravities' > /usr/lib/libwx_gtk.so: undefined reference to > `gtk_type_check_object_cast' > /usr/lib/libwx_gtk.so: undefined reference to `gdk_draw_rgb_image' > /usr/lib/libwx_gtk.so: undefined reference to > `gtk_accel_group_attach' > /usr/lib/libwx_gtk.so: undefined reference to > `gtk_label_parse_uline' > /usr/lib/libgmodule.so: undefined reference to > `g_static_private_get' > /usr/lib/libwx_gtk.so: undefined reference to `gdk_rgb_init' > /usr/lib/libwx_gtk.so: undefined reference to > `gtk_toolbar_set_button_relief' > /usr/lib/libwx_gtk.so: undefined reference to > `gtk_drag_set_icon_widget' > /usr/lib/libwx_gtk.so: undefined reference to `gtk_drag_dest_set' > /usr/lib/libwx_gtk.so: undefined reference to `gtk_label_set_text' > /usr/lib/libwx_gtk.so: undefined reference to > `g_thread_functions_for_glib_use' > /usr/lib/libwx_gtk.so: undefined reference to > `gtk_item_factory_get_item' > /usr/lib/libwx_gtk.so: undefined reference to `gtk_drag_dest_unset' > /usr/lib/libgmodule.so: undefined reference to > `g_static_mutex_get_mutex_impl' > /usr/lib/libwx_gtk.so: undefined reference to > `gdk_colormap_get_visual' > /usr/lib/libwx_gtk.so: undefined reference to `g_log' > /usr/lib/libwx_gtk.so: undefined reference to > `gtk_check_menu_item_set_active' > /usr/lib/libwx_gtk.so: undefined reference to `gtk_target_list_add' > /usr/lib/libwx_gtk.so: undefined reference to > `gtk_pixmap_set_build_insensitive' > /usr/lib/libwx_gtk.so: undefined reference to > `gtk_marshal_NONE__POINTER_POINTER' > /usr/lib/libwx_gtk.so: undefined reference to > `gtk_scrolled_window_add_with_viewport' > collect2: ld returned 1 exit status > > I don't know why these symbols aren't being found. They seem to there > in the libraries if I interegate them with `strings`. > > Thanks, > Brendan Simon.