codeblocks配置gtk问题,高分悬赏!!!
运行hello world, 提示“无法定位程序输入点deflateSetHeader与动态链接库zlib1.dll”
codeblocks版本:codeblocks-10.05mingw-setup.exe
gtk版本:gtk+-bundle_2.22.1-20101227_win32.zip
安装完之后配置如下:
1.首先在path环境变量中加gtk的bin路径 D:\GTK\bin;
2.settins->Compiler and debugger->Search directories(include文件目录都已添加,编译没出现问题)
3.settins->Compiler and debugger->Toolchain executables(这个是codeblocks安装完之后自动设置的,内容如下)
Selected compiler: GNU GCC Compiler
Compiler's installation directory:D:\Program Files\CodeBlocks\MinGW
C compiler: mingw32-gcc.exe
C++ compiler: mingw32-g++.exe
Linker for dyanmic libs: mingw32-g++.exe
Linker for static libs: ar.exe
Debugger: gdb.exe
Resource compiler: windres.exe
Make program:make.exe
4.settins->Global Variable Editor
Current Set: default
Current Variable: gtk
base: D:\GTK
include: D:\GTK\include
lib: D:\GTK\lib
刚装完运行hello world提示找不到xx.h头文件,将Search directories设置好之后,编译没问题了,
接着运行程序提示找不到xxx.dll文件, 我就把GTK下bin目录中的*.dll剪切到了lib目录下,然后再运行程序,就出现“无法定位”这个问题了。
[解决办法]
在windows下配置GTK+开发环境
http://hi.baidu.com/guiling1983/blog/item/1cb756398e121323b8998f8f.html
[解决办法]
这种无法定位的原因往往是因为DLL版本不匹配所致!