简体   繁体   English

在CodeBlocks Windows 7上安装GTK + 3

[英]installing GTK+3 on CodeBlocks Windows 7

I am trying to install GTK+3 on windows. 我正在尝试在Windows上安装GTK + 3。 It installs but it always tells me that it can't find the file libgtk-3-0.dll. 它已安装,但始终告诉我找不到文件libgtk-3-0.dll。 However, GTK+2 works perfectly for me. 但是,GTK + 2非常适合我。 The main issue is that I am trying to run some interface coded with GTK+3. 主要问题是我试图运行一些用GTK + 3编码的接口。 Only the interface appears but none of the drawing in it! 仅出现界面,但其中没有任何图形! How can I make this work? 我该如何进行这项工作? Do I need GTK+3 to make it work? 我需要GTK + 3使其正常工作吗? If yes, how can I install it properly? 如果是,如何正确安装?

If you installed both gtk2 and gtk3 there might be a conflict with you path. 如果同时安装了gtk2和gtk3,则路径可能会冲突。 Surely if you installed gtk2 from a setup file (it usually add a path) 当然,如果您是从安装文件安装gtk2的(通常会添加路径)

I do use both and compile gtk project with codeblock as well. 我确实使用了两者,并且也用代码块编译了gtk项目。 What I do is a dedicated folder where there is all gtk and dependency dll and always put the gtk executable I've build with CB. 我要做的是一个专用文件夹,其中包含所有gtk和依赖项dll,始终将我用CB构建的gtk可执行文件放进去。 download gtk3 from there http://www.gtk.org/download/win32.php and unzip 从那里下载gtk3 http://www.gtk.org/download/win32.php并解压缩

then create a folder MyGtk for example put all .dll from the /bin directory copy also the /etc & share content at the root of MyGtk then copy your .exe app also 然后创建一个文件夹MyGtk,例如将/ bin目录中的所有.dll都复制/ etc,并在MyGtk的根目录下共享内容,然后再复制.exe应用

everything should run fine. 一切都应该运行良好。 If not edit your windows path and remove any location to c:\\xxx\\gtk 如果没有,请编辑Windows路径并删除c:\\ xxx \\ gtk的任何位置

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

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