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

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

问题描述

Google 快速搜索此问题表明它很常见,但我终其一生都无法找出解决方案.

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.

我直接从 wxWidgets 网站直接安装了适用于 Windows 的 wxWidgets 2.8.8.

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

每当我尝试编译任何东西时(例如wxWidgets 的第一个程序"中描述的示例应用程序 - http://zetcode.com/tutorials/wxwidgetstutorial/firstprograms/)我明白了:

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: 没有这样的文件或目录

wx/setup.h: No such file or directory

我已经在我的编译器搜索列表中包含了 C:wxWidgets-2.8.8include 和 C:wxWidgets-2.8.8includewx.

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

应该很简单 - 但事实并非如此!:(

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

如果我尝试使用与 wxWidgets 集成的 IDE(例如 Code::Blocks),也会发生同样的事情 - 我原以为这会解决问题...

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...

所以,请帮忙...为什么找不到 setup.h?

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

推荐答案

当您安装" wxMSW 安装程序时,wxWidgets 没有内置到可用的库中.这是因为有太多可配置的元素,而这正是您所指的 setup.h 的用途.

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. 启动Visual Studio 命令提示符".您可以在Microsoft Visual Studio -> Visual Studio Tools"下的开始菜单中找到它.

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

切换到文件夹:[WXWIN root]uildmsw

Change to folder: [WXWIN root]uildmsw

构建默认调试配置:nmake -f makefile.vc BUILD=debug

构建默认发布配置:nmake -f makefile.vc BUILD=release

确保 DLL 在您的 PATH 中.它们位于 [WXWIN root]libvc_dll

Make sure the DLLs are in your PATH. They'll be found in [WXWIN root]libvc_dll

在上面提到的 DLL 文件夹下,您会找到每个构建变体的子文件夹(上面的说明分为两个,调试和发布.)在每个变体文件夹中,您会找到一个包含设置"的wx"文件夹.h" 文件.您会看到 setup.h 文件对于每个构建变体实际上是不同的.这些是您需要添加到项目构建配置的文件夹,包括路径,每个构建变体一个.因此,例如,您'会将 [WXWIN root]libvc_dllmswud 添加到调试版本的包含路径中,将 [WXWIN root]libvc_dllmswu 添加到您的发布版本中.

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]libvc_dllmswud to the include path for your debug build, [WXWIN root]libvc_dllmswu for your release build.

可以构建许多其他变体组合:静态库、单一库、非 Unicode 等.请参阅 [WXWIN root]docsmswinstall.txt 了解更多详细说明.

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

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

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