wxwidgets setup.h“没有这样的文件” [英] wxwidgets setup.h "no such file"

查看:818
本文介绍了wxwidgets setup.h“没有这样的文件”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google快速搜索这个问题显示很常见,我只是不能为我的生活找出在我的情况下的解决方案。



我有一个直接从wxWidgets网站直接安装wxWidgets 2.8.8。



每当我尝试编译任何内容(如wxWidgets的第一个程序 - http://zetcode.com/tutorials/wxwidgetstutorial/firstprograms/ )我得到:



wx / setup.h:没有这样的文件或目录



\\ wxWidgets-2.8.8 \include和C:\wxWidgets-2.8.8 \include\wx在我的编译器搜索列表中。



- 但它不是! :(



同样的事情发生,如果我尝试使用集成与wxWidgets的IDE(如Code :: Blocks) - 这个,我会想, ...



因此,有些帮助...为什么没有找到setup.h?

解决方案

当你安装wxMSW安装程序时,wxWidgets不会内置到可用的库中,这是因为有这么多可配置的元素,这正是你的setup.h to is for。



如果你只是想尽快使用默认选项来构建它,请按照下列步骤操作:


  1. 启动Visual Studio命令提示符。您将在Microsoft Visual Studio - > Visual Studio Tools下的开始菜单中找到这个。


  2. 更改为文件夹:[WXWIN root] \build\\\\\\\\\\\\\\\\\\\ : nmake -f makefile.vc BUILD = debug


  3. 建立预设版本配置: nmake -f makefile.vc BUILD = release


  4. 确保DLL位于PATH中。他们将在[WXWIN root] \lib \vc_dll

  5. 中找到
  6. 在上述DLL文件夹下,您将找到每个构建变量的子文件夹上面的指令做了两个,调试和发布)在每个变体文件夹,你会发现一个'wx'文件夹包含一个'setup.h'文件。你会看到setup.h文件实际上是不同的每个构建变体。这些是你需要添加到你的项目构建配置包含路径的文件夹,每个构建版本一个。因此,例如,你可以添加[WXWIN root] \lib \vc_dll\调试版本,[WXWIN root] \lib \vc_dll\mswu为您的发行版。


  7. 可以构建许多其他变体组合:静态库,单片单库,非Unicode等。有关更详细的说明,请参阅[WXWIN root] \docs\msw\install.txt。



A quick Google search of this issue shows it's common, I just can't for the life of me figure out the solution in my case.

I have a straight forward install of wxWidgets 2.8.8 for Windows straight from the wxWidgets website.

Whenever I try to compile anything (such as the sample app described in "First Programs for wxWidgets" - http://zetcode.com/tutorials/wxwidgetstutorial/firstprograms/ ) I get:

wx/setup.h: No such file or directory

I've included both C:\wxWidgets-2.8.8\include and C:\wxWidgets-2.8.8\include\wx in my compiler search list.

It should be simple - but it's not! :(

The same thing happens if I try to use an IDE integrated with wxWidgets (such as Code::Blocks) - and this, I would have thought, would have just worked out the box...

So, some help please... Why is setup.h not found?

解决方案

wxWidgets is not built into useable libraries when you "install" the wxMSW installer. This is because there are so many configurable elements, which is precisely what the setup.h you refer to is for.

If you just want to build it with default options as quickly as possible and move on, here is how:

  1. Start the "Visual Studio Command Prompt." You'll find this in the start menu under "Microsoft Visual Studio -> Visual Studio Tools".

  2. Change to folder: [WXWIN root]\build\msw

  3. Build default debug configuration: nmake -f makefile.vc BUILD=debug

  4. Build default release configuration: nmake -f makefile.vc BUILD=release

  5. Make sure the DLLs are in your PATH. They'll be found in [WXWIN root]\lib\vc_dll

  6. Under the DLL folder mentioned above, you will find subfolders for each build variant (The instructions above made two, debug and release.) In each variant folder you'll find a 'wx' folder containing a 'setup.h" file. You'll see that the setup.h files are actually different for each build variant. These are the folders you need to add to your project build configuration include path, one per build variant. So, for example, you'd add [WXWIN root]\lib\vc_dll\mswud to the include path for your debug build, [WXWIN root]\lib\vc_dll\mswu for your release build.

  7. It is possible to build lots of other variant combinations: static libs, monolithic single library, non-Unicode, etc. See [WXWIN root]\docs\msw\install.txt for much more extensive instructions.

这篇关于wxwidgets setup.h“没有这样的文件”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆