Because the Linux command is unfamiliar, and time is not abundant, still decided to develop GUI program under Win7_64bit, choose GTKMM because:
1. In the graphical interface program, the Windows system is well-deserved GUI king, user-friendly other OS cannot replace
2. QT Although the copyright has been released, but the QT signal mechanism is uncomfortable, too tightly coupled design makes me feel unlike C + + writing programs
3. Wxwidget is a good graphics library, can be excessive macro packaging form of abstraction, and Microsoft's MFC as indiscriminate
4. Windows comes with the API package is a good choice, but the API is cumbersome and C language packaging, many places design is unreasonable, left to programmers to develop the freedom is not too much, many places to write dead is completely a stereotype
5. Other GUI libraries are not familiar, Microsoft's. NET Framework good unfortunately opaque and non-cross-platform, SDL for multimedia development, WTL and COM is the WIN32API of the package is OK, but the learning cost is very large outside the trap!
It is therefore decided to use GTKMM to develop GUI program, my development environment is:
Os:windows 7
Ide:code::blocks
Compiler: MINGW-64
1. First install the mingw-64m
Downloaded from http://sourceforge.net/projects/mingw-w64/x86_64-w64-mingw32-gcc-4.8.0-win64_rubenvb.7z
Then unzip it into the development tools directory, mine is D:\DEVS\MINGW64
2. Install code::blocks Google search Xia Guan Web download
3. Set up a new compiler, set the X86_64-w64-mingw32-g++.exe in the Mingw64\bin, and then create a new Hello World, under Task Manager to see if it is test.exe* 32 is still in Test.exe, which indicates that the 64-bit compiler was successful (compiled HelloWorld is 64-bit)
4. Go to GTKMM official website to download the Windows version of GTKMM, my version is Gtkmm-win64-devel-2.22.0-2.exe, installed in a directory of my d:\devlibs\gtkmm64
5. (key) Create a new bat file with the following content:
Setx Pkg_config_path D:\devlibs\gtkmm64\lib\pkgconfig-m
Pause
Run with administrator privileges after saving, modify the environment variable Pkg_config_path value to Lib\pkgconfig under the gtkmm64 directory
6. In general, when installing GTKMM, the installer has set the path to D:\devlibs\gtkmm64\bin
Win+r Open the CMD console program, try Pkg-config if it can run, you can type the following command pkg-config--modversion--cflags--libs gtkmm-2.4
If the 5th step succeeds then a string of-id:/devlibs/gtkmm64/include/...-lintl is displayed
7. Enter Codeblocks to create a new empty project, add a. cc file with the following code:
#include <gtkmm.h>
int main (int argc, char *argv[])
{
Gtk::main Kit (argc, argv);
Gtk::window Window;
Gtk::main::run (window);
return 0;
}
8. Menu Project > Build Options Popup Project Build Options dialog box
Compiler Setting > Other options write ' Pkg-config gtkmm-2.4--cflags '
Linker Settings > Other Linker options write ' Pkg-config--libs gtkmm-2.4 '
Ok close dialog box
9. Compile run, find popup similar to Ld.exe | Can not find-lgtkmm-2.4 link error (I use-static to compile statically)
Open the Gtkmm64\lib folder, locate a file similar to LIBGTKMM-2.4.DLL.A, rename the file libgtkmm-2.4.a (that is, remove the. dll from the file name)
10. Compile successfully, enjoy.
http://blog.csdn.net/u014252696/article/details/24650081
Win7 (64bit) using MINGW64 configuration gtkmm