On Sat, May 23, 2009 at 4:56 PM, Armin Burgmeier <[email protected]> wrote: > On Sat, 2009-05-23 at 16:47 +0800, 明覺 wrote: >> I installed mingw and >> http://ftp.gnome.org/pub/GNOME/binaries/win32/gtkmm/2.16/gtkmm-win32-devel-2.16.0-2.exe, >> but when I compile the most basic gtkmm application on windows vista >> by this command, >> ------------------------------- >> g++ -mno-cygwin -mms-bitfields -IC:/gtkmm/include/gtkmm-2.4 >> -IC:/gtkmm/lib/gtkmm-2.4/include -IC:/gtkmm/include/glibmm-2.4 >> -IC:/gtkmm/lib/glibmm-2.4/include -IC:/gtkmm/include/giomm-2.4 >> -IC:/gtkmm/lib/giomm-2.4/include -IC:/gtkmm/include/gdkmm-2.4 >> -IC:/gtkmm/lib/gdkmm-2.4/include -IC:/gtkmm/include/pangomm-1.4 >> -IC:/gtkmm/include/atkmm-1.6 -IC:/gtkmm/include/gtk-2.0 >> -IC:/gtkmm/include/sigc++-2.0 -IC:/gtkmm/lib/sigc++-2.0/include >> -IC:/gtkmm/include/glib-2.0 -IC:/gtkmm/lib/glib-2.0/include >> -IC:/gtkmm/lib/gtk-2.0/include -IC:/gtkmm/include/cairomm-1.0 >> -IC:/gtkmm/include/pango-1.0 -IC:/gtkmm/include/cairo >> -IC:/gtkmm/include/libpng12 -IC:/gtkmm/include/atk-1.0 -LC:/gtkmm/lib >> -lgtkmm-2.4 -lgiomm-2.4 -lgdkmm-2.4 -latkmm-1.6 -lgtk-win32-2.0 >> -lpangomm-1.4 -lcairomm-1.0 -lglibmm-2.4 -lsigc-2.0 -lgdk-win32-2.0 >> -latk-1.0 -lgio-2.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 >> -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 >> -lglib-2.0 -lintl -o b base.cc >> --------------------------------- > > First mention the file to compile, and then all the libraries to link > against, instead of the other way around: > > g++ -mno-cygwin -mms-bitfields base.cc -o b [the other stuff comes here] thank you very much, making this change solved my problem! > > If you are using msys, you can use pkg-config to make this easier: no, i do not use msys, for it even doesn't have a copy/paste, i totally refuse to use it:) > > g++ base.cc -o b `pkg-config --cflags --libs gtkmm-2.4` > > This won't work in the normal Windows command line (cmd.exe) though. now i can use cmd.exe to compile my gtkmm files successfully, only by mingw :)
> >> I got this error: >> ------------------------------------------------------------------------------------------ >> C:\Users\Star\AppData\Local\Temp/ccqIpTdR.o:base.cc:(.text+0x18a): >> undefined reference to `Gtk::Main::Main(int&, char**&, bool)' >> C:\Users\Star\AppData\Local\Temp/ccqIpTdR.o:base.cc:(.text+0x1a7): >> undefined reference to `Gtk::Window::Window(Gtk::WindowType)' >> C:\Users\Star\AppData\Local\Temp/ccqIpTdR.o:base.cc:(.text+0x1bc): >> undefined reference to `Gtk::Main::run(Gtk::Window&)' >> C:\Users\Star\AppData\Local\Temp/ccqIpTdR.o:base.cc:(.text+0x1d1): >> undefined reference to `Gtk::Window::~Window()' >> C:\Users\Star\AppData\Local\Temp/ccqIpTdR.o:base.cc:(.text+0x1e6): >> undefined reference to `Gtk::Main::~Main()' >> C:\Users\Star\AppData\Local\Temp/ccqIpTdR.o:base.cc:(.text+0x230): >> undefined reference to `Gtk::Window::~Window()' >> C:\Users\Star\AppData\Local\Temp/ccqIpTdR.o:base.cc:(.text+0x25d): >> undefined reference to `Gtk::Main::~Main()' >> C:\Users\Star\AppData\Local\Temp/ccqIpTdR.o:base.cc:(.text+0x2c7): >> undefined reference to `Glib::ustring::ustring(char const*)' >> C:\Users\Star\AppData\Local\Temp/ccqIpTdR.o:base.cc:(.text+0x2ea): >> undefined reference to `Glib::ustring::ustring(char const*)' >> C:\Users\Star\AppData\Local\Temp/ccqIpTdR.o:base.cc:(.text+0x30d): >> undefined reference to `Glib::ustring::ustring(char const*)' >> C:\Users\Star\AppData\Local\Temp/ccqIpTdR.o:base.cc:(.text+0x330): >> undefined reference to `Glib::ustring::ustring(char const*)' >> C:\Users\Star\AppData\Local\Temp/ccqIpTdR.o:base.cc:(.text+0x353): >> undefined reference to `Glib::ustring::ustring(char const*)' >> C:\Users\Star\AppData\Local\Temp/ccqIpTdR.o:base.cc:(.text+0x376): >> more undefined references to `Glib::ustring::ustring(char const*)' >> follow >> C:\Users\Star\AppData\Local\Temp/ccqIpTdR.o:base.cc:(.text+0x3b4): >> undefined reference to `Glib::ustring::~ustring()' >> C:\Users\Star\AppData\Local\Temp/ccqIpTdR.o:base.cc:(.text+0x3cf): >> undefined reference to `Glib::ustring::~ustring()' >> C:\Users\Star\AppData\Local\Temp/ccqIpTdR.o:base.cc:(.text+0x3ea): >> undefined reference to `Glib::ustring::~ustring()' >> C:\Users\Star\AppData\Local\Temp/ccqIpTdR.o:base.cc:(.text+0x405): >> undefined reference to `Glib::ustring::~ustring()' >> C:\Users\Star\AppData\Local\Temp/ccqIpTdR.o:base.cc:(.text+0x420): >> undefined reference to `Glib::ustring::~ustring()' >> C:\Users\Star\AppData\Local\Temp/ccqIpTdR.o:base.cc:(.text+0x43b): >> more undefined references to `Glib::ustring::~ustring()' follow >> collect2: ld returned 1 exit status >> ------------------------------------------------------------ >> how could i solve it? thanks > > Armin > > -- 我的操作系統是Gnu/Linux Debian/gNewSense Gnome Mozilla Gmail/Evolution Gtkmm/Gtkglextmm Scim Totem Pidgin. _______________________________________________ gtkmm-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gtkmm-list
