On Sun, May 24, 2009 at 1:42 AM, Armin Burgmeier <[email protected]> wrote: > On Sat, 2009-05-23 at 18:20 +0800, 明覺 wrote: >> 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:) > > It has. You can copy text by selecting it, and paste text by a middle > mouse click. You can also delete or rename msys's rxvt.exe in which case > it will use a normal Windows console window instead. Thank you for the info, I can copy/paste in msys now, so I'm trying to build gtkglextmm-1.2 on it, it can ./configure successfully, but when make, it has errors: ---------------------------------------------------------------------------------------- make all-recursive make[1]: Entering directory `/home/gtkglextmm-1.2.0' Making all in tools make[2]: Entering directory `/home/gtkglextmm-1.2.0/tools' Making all in extra_defs_gen make[3]: Entering directory `/home/gtkglextmm-1.2.0/tools/extra_defs_gen' if g++ -DHAVE_CONFIG_H -I. -I. -I../.. -mms-bitfields -Ic:/mingw/include/gtkglext-1.0 -Ic:/mingw/lib/gtkglext-1.0/include -Ic:/mingw/include/gtk-2.0 -Ic:/mingw/lib/gtk-2.0/include -Ic:/mingw/include/pango-1.0 -Ic:/mingw/include/glib-2.0 -Ic:/mingw/lib/glib-2.0/include -Ic:/mingw/include/cairo -Ic:/mingw/include/libpng12 -Ic:/mingw/include/gdkmm-2.4 -Ic:/mingw/lib/gdkmm-2.4/include -Ic:/mingw/include/glibmm-2.4 -Ic:/mingw/lib/glibmm-2.4/include -Ic:/mingw/include/pangomm-1.4 -Ic:/mingw/include/cairomm-1.0 -Ic:/mingw/include/sigc++-2.0 -Ic:/mingw/lib/sigc++-2.0/include -Ic:/mingw/include/atk-1.0 -Ic:/mingw/include/gtkmm-2.4 -Ic:/mingw/lib/gtkmm-2.4/include -Ic:/mingw/include/giomm-2.4 -Ic:/mingw/lib/giomm-2.4/include -Ic:/mingw/include/atkmm-1.6 -g -O2 -Wall -mms-bitfields -MT generate_defs_gtkglext.o -MD -MP -MF ".deps/generate_defs_gtkglext.Tpo" \ -c -o generate_defs_gtkglext.o `test -f 'generate_defs_gtkglext.cc' || echo './'`generate_defs_gtkglext.cc; \ then mv -f ".deps/generate_defs_gtkglext.Tpo" ".deps/generate_defs_gtkglext.Po"; \ else rm -f ".deps/generate_defs_gtkglext.Tpo"; exit 1; \ fi g++.exe: : Invalid argument make[3]: *** [generate_defs_gtkglext.o] Error 1 make[3]: Leaving directory `/home/gtkglextmm-1.2.0/tools/extra_defs_gen' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/gtkglextmm-1.2.0/tools' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/gtkglextmm-1.2.0' make: *** [all] Error 2 ---------------------------------------------------------------------------------------------------------------------- I'm using the offical source package: http://downloads.sourceforge.net/gtkglext/gtkglextmm-1.2.0.tar.gz, any advice to solve it? thanks
> >> > 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 >> > >> > > > 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
