C++ 代码块 - wx/setup: 没有这样的文件或目录
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12105107/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Code Blocks - wx/setup: no such file or directory
提问by itsols
I'm trying to write my first cpp program on Windows+Code Blocks.
我正在尝试在 Windows+Code Blocks 上编写我的第一个 cpp 程序。
I've installed wxwidgets.
我已经安装了 wxwidgets。
I have a label and a button.
我有一个标签和一个按钮。
When I hit F9, I get the error: error: wx/setup.h: No such file or directory.
当我按 F9 时,出现错误:error: wx/setup.h: No such file or directory。
The error is highlighted on the file platform.h at line 196 which contains #include "wx/setup.h"
该错误突出显示在文件 platform.h 的第 196 行,其中包含#include "wx/setup.h"
I did a search for the file on my hdd. It is in c:\wxWidgets-2.8.12\wx\mswand some other locations as well.
我在我的硬盘上搜索了这个文件。它位于c:\wxWidgets-2.8.12\wx\msw和其他一些位置。
When I change the line 196 to wx/msw/setup.hthis error is gone but there are other errors.
当我将第 196 行更改为wx/msw/setup.h 时,此错误消失了,但还有其他错误。
I think I'm missing on something really elementary but also vital. Any thoughts please... Thanks!
我想我错过了一些非常基本但也很重要的东西。任何想法请...谢谢!
EDIT: I don't know if this matters but when I start a new wxwidgets project I get the following screen:
And then I continue clicking yes.
编辑:我不知道这是否重要,但是当我开始一个新的 wxwidgets 项目时,我会看到以下屏幕:
然后我继续单击是。
采纳答案by Dinesh Subedi
Which GUI builder you have selected while creating project. I think this error occurs due to incorrect selection of GUI builder. For your project select
您在创建项目时选择了哪个 GUI 构建器。我认为这个错误是由于 GUI 构建器的选择不正确造成的。为您的项目选择
wxformBuilder
表单生成器
in prefered GUI Builder option and select
在首选的 GUI Builder 选项中并选择
frame based
基于框架的
in application type option. You can follow this link herewhich explain to setup every step by step.
在应用程序类型选项中。您可以点击此处的链接,该链接解释了逐步设置的每个步骤。
回答by MPanther
It is now 2016 and most of the above are 2012 so probably earlier versions of Code::Blocks or Widgets, but I found it was whenever I didn't have 'enable unicode' selected it gave the no Setup.h file error. With 'enable unicode' selected there is no problem.
现在是 2016 年,以上大部分是 2012 年,所以可能是 Code::Blocks 或 Widgets 的早期版本,但我发现每当我没有选择“启用 unicode”时,它都会给出没有 Setup.h 文件错误。选择“启用 unicode”没有问题。