简体   繁体   English

将GTKmm添加到CodeBlocks-Windows

[英]Add GTKmm to CodeBlocks - Windows

Codeblocks can't find the instalation of GTKmm. 代码块找不到GTKmm的安装。 I instaled it on the default path: "C:\\gtkmm" 我在默认路径上安装了它:“ C:\\ gtkmm”

I have tried many things like adding "pkg-config gtkmm-3.0 --cflags" and "pkg-config gtkmm-3.0 --libs" but i still get: 我已经尝试了很多类似添加"pkg-config gtkmm-3.0 --cflags""pkg-config gtkmm-3.0 --libs"但是我仍然得到:

"fatal error: gtkmm.h: No such file or directory"

What can i do? 我能做什么?

My setup is Codeblocks with MinGW on windows 7 64bit. 我的设置是在Windows 7 64bit上使用MinGW的Codeblocks。

This is how I got it working on Windows 8 这就是我在Windows 8上运行它的方式

  1. Made sure the gtkmm version in the pkg-config command is correct - mine is 2.4 (checked in lib folder in gtkmm64 installation folder) 确保pkg-config命令中的gtkmm版本正确-我的是2.4(已在gtkmm64安装文件夹中的lib文件夹中检查)
  2. Under Settings > Compile > Toolchain executables, made sure that the compilers installation directory is C:\\Codeblocks\\MinGW (I installed Code 13.12 with WinGW included) 在“设置”>“编译”>“工具链可执行文件”下,确保编译器的安装目录为C:\\ Codeblocks \\ MinGW(我安装了包含WinGW的Code 13.12)
  3. Under Settings > Environment > Environment variables, then click Add: Variable name: PKG_CONFIG_PATH Variable value: C:\\gtkmm64\\lib\\pkgconfig 在设置>环境>环境变量下,然后单击添加:变量名称:PKG_CONFIG_PATH变量值:C:\\ gtkmm64 \\ lib \\ pkgconfig

(I installed Codeblocks and gtkmm64 under C:\\ to avoid the space in "Program Files" which some things dont seem to like) (我在C:\\下安装了Codeblocks和gtkmm64,以避免出现“程序文件”中某些似乎不喜欢的空间)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM