GNOME Bugzilla – Bug 150411
Fail to compile the tutorial program on windows xp
Last modified: 2004-12-22 21:47:04 UTC
I followed the steps in the offical gtkmm tutorial (http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/ape.html#id2521845) to install the dev-cpp, gtk+ and gtkmm on my windows xp professional (without sp1) on my machine. I test the dev-cpp and gtk environment by following Mr. Pandhare S.M.'s mini-howto. The program was successfully compiled. Then I tried to follow the gtkmm tutorial mentioned above to test dev-cpp with gtkmm. However, the compiler generated a series of errors as follow. I am using dev-cpp version 4.9.9.0 (windows installer) and gtkmm Developer Environment 2.4.5 for Mingw (downloaded from http://www.pcpm.ucl.ac.be/~gustin/win32_ports/binaries/gtkmm-devel-2.4.5-2.exe) COMPILE ERRORS -------------------------------------------------------------------------------- Compiler: Default compiler Building Makefile: "E:\Temp\Makefile.win" Executing make... make.exe -f "E:\Temp\Makefile.win" all g++.exe -c gtkmm_test.cpp -o gtkmm_test.o -I"E:/Dev-Cpp/include/c++/3.3.1" -I"E:/Dev-Cpp/include/c++/3.3.1/mingw32" -I"E:/Dev-Cpp/include/c++/3.3.1/backward" -I"E:/Dev-Cpp/lib/gcc-lib/mingw32/3.3.1/include" -I"E:/Dev-Cpp/include" -Ie:/dev-cpp/include/gtkmm-2.4 -Ie:/dev-cpp/include/glibmm-2.4 -Ie:/dev-cpp/include/gdkmm-2.4 -Ie:/dev-cpp/lib/gtkmm-2.4/include -Ie:/dev-cpp/lib/glibmm-2.4/include -Ie:/dev-cpp/lib/gdkmm-2.4/include -Ie:/dev-cpp/include/pangomm-1.4 -Ie:/dev-cpp/include/atkmm-1.6 -Ie:/dev-cpp/include/gtk-2.0 -Ie:/dev-cpp/lib/sigc++-2.0/include -Ie:/dev-cpp/include/sigc++-2.0 -Ie:/dev-cpp/include/glib-2.0 -Ie:/dev-cpp/lib/glib-2.0/include -Ie:/dev-cpp/lib/gtk-2.0/include -Ie:/dev-cpp/include/pango-1.0 -Ie:/dev-cpp/include/atk-1.0 -Le:/dev-cpp/lib -mno-cygwin -mms-bitfields In file included from e:/dev-cpp/include/glibmm-2.4/glibmm.h:59, from e:/dev-cpp/include/gtkmm-2.4/gtkmm.h:29, from gtkmm_test.cpp:1: e:/dev-cpp/include/glibmm-2.4/glibmm/spawn.h:39: error: syntax error before `;' token e:/dev-cpp/include/glibmm-2.4/glibmm/spawn.h:144: error: type specifier omitted for parameter `Pid' e:/dev-cpp/include/glibmm-2.4/glibmm/spawn.h:144: error: syntax error before `* ' token e:/dev-cpp/include/glibmm-2.4/glibmm/spawn.h:153: error: type specifier omitted for parameter `Pid' e:/dev-cpp/include/glibmm-2.4/glibmm/spawn.h:153: error: syntax error before `* ' token e:/dev-cpp/include/glibmm-2.4/glibmm/spawn.h:163: error: type specifier omitted for parameter `Pid' e:/dev-cpp/include/glibmm-2.4/glibmm/spawn.h:163: error: syntax error before `* ' token e:/dev-cpp/include/glibmm-2.4/glibmm/spawn.h:169: error: type specifier omitted for parameter `Pid' e:/dev-cpp/include/glibmm-2.4/glibmm/spawn.h:169: error: syntax error before `* ' token e:/dev-cpp/include/glibmm-2.4/glibmm/spawn.h:195: error: `Pid' was not declared in this scope e:/dev-cpp/include/glibmm-2.4/glibmm/spawn.h:195: error: syntax error before `) ' token In file included from e:/dev-cpp/include/gdkmm-2.4/gdkmm/cursor.h:31, from e:/dev-cpp/include/gdkmm-2.4/gdkmm.h:39, from e:/dev-cpp/include/gtkmm-2.4/gtkmm.h:30, from gtkmm_test.cpp:1: e:/dev-cpp/include/gdkmm-2.4/gdkmm/display.h:424: error: syntax error before `* ' token e:/dev-cpp/include/gdkmm-2.4/gdkmm/display.h:425: error: syntax error before `* ' token make.exe: *** [gtkmm_test.o] Error 1 Execution terminated -------------------------------------------------------------------------------- Thanks
Are you sure your GTK+ is 2.4. I suspect you're still using GTK+ 2.2 (probably the dropline installer as it defaults to C:\dev-cpp). For gtkmm-2.4, you need GTK+-2.4 (http://gladewin32.sf.net).
Hi Gustin, Thanks very much for your help. The gtk development lib i was using is 2.0. I downloaded the 2.4 dev environment and it compiled successfully. Regards, Liang
*** Bug 143875 has been marked as a duplicate of this bug. ***