Re: Gtkmm win32



Hamar Gabor wrote:

Hello,

I have similar problems, with gtkmm on win32. I installed mingw 3.1.0
cygwin, the gtkmm and gtk+ developper package with Cedric Gustin's
installer to C:\Gtk.

pkg-config works fine, the output of pkg-config --cflags --libs
gtkmm-2.4 is:
-Ic:/GTK/include/gtkmm-2.4 -Ic:/GTK/lib/gtkmm-2.4/include
-Ic:/GTK/include/glibmm-2.4 -Ic:/GTK/lib/glibmm-2.4/include
-Ic:/GTK/include/gdkmm-2.4 -Ic:/GTK/lib/gdkmm-2.4/include
-Ic:/GTK/include/pangomm-1.4 -Ic:/GTK/include/atkmm-1.6
-Ic:/GTK/include/gtk-2.0 -Ic:/GTK/include/sigc++-2.0
-Ic:/GTK/lib/sigc++-2.0/include -Ic:/GTK/include/glib-2.0
-Ic:/GTK/lib/glib-2.0/include -Ic:/GTK/lib/gtk-2.0/include
-Ic:/GTK/include/pango-1.0 -Ic:/GTK/include/atk-1.0  -Lc:/GTK/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
The g++ version is:
$ g++ --version
g++.exe (GCC) 3.2.3 (mingw special 20030504-1)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

I can compile the program, but i can't link. The output of
$ g++ -o test.exe `pkg-config.exe --cflags --libs gtkmm-2.4
libglademm-2.4` main.cpp

C:\DOCUME~1\Hamar\LOCALS~1\Temp/ccYdbaaa.o(.text+0xb3):main.cpp:
undefined reference to `Gtk::Main::Main(int&, char**&, bool)'
C:\DOCUME~1\Hamar\LOCALS~1\Temp/ccYdbaaa.o(.text+0xcc):main.cpp:
undefined reference to `Glib::ustring::ustring()'
C:\DOCUME~1\Hamar\LOCALS~1\Temp/ccYdbaaa.o(.text+0xee):main.cpp:
undefined reference to `Glib::ustring::ustring(char const*)'
C:\DOCUME~1\Hamar\LOCALS~1\Temp/ccYdbaaa.o(.text+0x13d):main.cpp:
undefined reference to `Gnome::Glade::Xml::create(std::string const&,
Glib::ustring const&, Glib::ustring const&)'
C:\DOCUME~1\Hamar\LOCALS~1\Temp/ccYdbaaa.o(.text+0x1ec):main.cpp:
undefined reference to `Glib::ustring::~ustring()'
C:\DOCUME~1\Hamar\LOCALS~1\Temp/ccYdbaaa.o(.text+0x213):main.cpp:
undefined reference to `Glib::ustring::~ustring()'
C:\DOCUME~1\Hamar\LOCALS~1\Temp/ccYdbaaa.o(.text+0x23a):main.cpp:
undefined reference to `Glib::ustring::~ustring()'
C:\DOCUME~1\Hamar\LOCALS~1\Temp/ccYdbaaa.o(.text+0x264):main.cpp:
undefined reference to `Glib::ustring::~ustring()'
C:\DOCUME~1\Hamar\LOCALS~1\Temp/ccYdbaaa.o(.text+0x290):main.cpp:
undefined reference to `Glib::ustring::ustring(char const*)'
C:\DOCUME~1\Hamar\LOCALS~1\Temp/ccYdbaaa.o(.text+0x2e7):main.cpp:
undefined reference to `Glib::ustring::~ustring()'
C:\DOCUME~1\Hamar\LOCALS~1\Temp/ccYdbaaa.o(.text+0x311):main.cpp:
undefined reference to `Glib::ustring::~ustring()'
C:\DOCUME~1\Hamar\LOCALS~1\Temp/ccYdbaaa.o(.text+0x357):main.cpp:
undefined reference to `Gtk::Widget::show()'
C:\DOCUME~1\Hamar\LOCALS~1\Temp/ccYdbaaa.o(.text+0x36f):main.cpp:
undefined reference to `Gtk::Main::run(Gtk::Window&)'
C:\DOCUME~1\Hamar\LOCALS~1\Temp/ccYdbaaa.o(.text+0x3e0):main.cpp:
undefined reference to `Gtk::Main::~Main()'
C:\DOCUME~1\Hamar\LOCALS~1\Temp/ccYdbaaa.o(.text+0x4cd):main.cpp:
undefined reference to `Gtk::Main::~Main()'
C:\DOCUME~1\Hamar\LOCALS~1\Temp/ccYdbaaa.o(.text$_ZN5Gnome5Glade3Xml10get_widgetIN3Gtk6WindowEEEPT_RKN4Glib7ustringERS6_+0xd):main.cpp:
undefined reference to `Gtk::Window::get_base_type()'
C:\DOCUME~1\Hamar\LOCALS~1\Temp/ccYdbaaa.o(.text$_ZN5Gnome5Glade3Xml10get_widgetIN3Gtk6WindowEEEPT_RKN4Glib7ustringERS6_+0x1c):main.cpp:
undefined reference to
`Gnome::Glade::Xml::get_widget_checked(Glib::ustring const&, unsigned
long)'
C:\DOCUME~1\Hamar\LOCALS~1\Temp/ccYdbaaa.o(.text$_ZN5Gnome5Glade3Xml10get_widgetIN3Gtk6WindowEEEPT_RKN4Glib7ustringERS6_+0x6c):main.cpp:
undefined reference to `g_log'

Can anybody help me?

Thanks,
Gabor

This is what Cedric wrote to me not too long ago in this list:
 Try to upgrade your gcc to 3.4.2 (available from http://www.mingw.org).
 Might be a name mangling and compatibility problem between gcc 3.2 and
 3.4. You might also want to use the -Wl,--enable-runtime-pseudo-reloc
 option at link time if you get "auto-import" errors.
antonio




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