Microsoft Visual Studio 2017中的wxWidgets设置 [英] wxWidgets setup in Microsoft Visual Studio 2017

查看:404
本文介绍了Microsoft Visual Studio 2017中的wxWidgets设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大约20个小时以来,我一直在努力寻找如何在Microsoft Visual Studio 2017中设置wxWidgets的方法.

I've been trying to figure out for about 20 hours how to setup wxWidgets in Microsoft visual studio 2017. I've followed:

https://wiki.wxwidgets.org/Microsoft_Visual_C%2B%2B_Guide

https://raw.githubusercontent.com/wxWidgets/wxWidgets/WX_3_0_BRANCH/docs/msw/install.txt

以及其他有关如何设置它的网站.我什至关注了该网站上的一些帖子,例如youtube:

and other numerous websites on how to set it up. I've even followed some of the posts in this website like and youtube:

如何设置wxWidgets使用Visual Studio 2015的3.1.0

我被困住了: 我从源代码编译它.而且我相信我对此没有任何问题.我是静态编译的(DEBUG/RELEASE)...

I am literally stuck: I compiled it from source. And I believe I had no problem with it. I compiled it statically (DEBUG/RELEASE)...

每次我遵循教程和帖子时,都会收到非常奇怪的消息...

Everytime I follow the tutorials and posts I get very weird messages...

会不会有人愿意花一些时间向我展示如何为Microsoft Visual Studio 2017完全设置wxWidgets(项目设置等)?

Would there be anyone with a kind heart bother to spend some of his time to show me how to setup wxWidgets for Microsoft visual studio 2017 (Project Setup or something) fully?

每个答案将不胜感激:|

Every answer would be appreciated :|

很抱歉没有为您提供足够的信息.

Sorry for not providing you guys with enough information.

https://wiki.wxwidgets.org/Microsoft_Visual_C%2B%2B_Guide

使用了上面的链接后,手动创建新项目"无效了

Been following the above link... The "Creating a new project by hand" didn't work

使用从示例创建新项目":

With the "Creating a new project from a sample":

使用最小样本而不是内部样本,因为它具有解决方案文件(没有内部文件)...

Used the minimal sample instead of the internat because it had a solution file (internat didn't)...

我修改了.sln和.vcxproj文件(用wxWidgets目录替换了../.. ....),当试图编译一些简单的代码时,出现了很多错误,例如:无法打开源文件" wx. wx.h".因此,我进入了项目属性/vc ++目录,并指定了include和lib位置

I modified the .sln and .vcxproj file (replaced ../.. .... with the wxWidgets directory) and when tried to compile some simple code got plenty of errors like: "cannot open source file "wx.wx.h". So I went to project properties/ vc++ directories and specified the include and lib locations

包括目录: C:\ wxWidgets-3.1.0/include C:\ wxWidgets-3.1.0/include/msvc

Include Directories: C:\wxWidgets-3.1.0/include C:\wxWidgets-3.1.0/include/msvc

图书馆目录 C:\ wxWidgets-3.1.0/lib/vc_lib

Libraries Directories C:\wxWidgets-3.1.0/lib/vc_lib

然后我得到很多错误,例如无法打开C:\ wxWidgets-3.1.0 \ samples.RC

And then I got LOTS of errors like "could not open C:\wxWidgets-3.1.0\samples.RC

因此,我以记事本打开项目文件,并添加了source.rc位置:

So I opened the project file as notepad and added the source.rc location:

ItemGroup ResourceCompile Include ="C:\ wxWidgets-3.1.0 \ samples \ sample.rc"/ 并且source.rc消失了,但是仍然有50个错误:

ItemGroup ResourceCompile Include="C:\wxWidgets-3.1.0\samples\sample.rc" / and the source.rc disappeared, but the so 50 errors were still there:

(例如错误C2491'wxBitmapButton :: ms_classInfo':dllimport静态数据成员的定义不允许核心C:\ wxWidgets-3.1.0 \ src \ common \ bmpbtncmn.cpp 71)

(e.g. Error C2491 'wxBitmapButton::ms_classInfo': definition of dllimport static data member not allowed core C:\wxWidgets-3.1.0\src\common\bmpbtncmn.cpp 71)

是否有设置wxWidgets的简便方法?

Is there any easy way of setting up wxWidgets?

如何设置wxWidgets使用Visual Studio 2015的3.1.0

在上面的链接中,第一个答案的底部是下一步是将samples \ minimal文件夹复制到某个位置并开始编写代码.您需要做的就是更改"Include and Lib"搜索路径."

In the above link the bottom of the first answer "The next step is to copy the samples\minimal folder somewhere and start writing the code. All you will need to do is to change the Include and Lib search path."

我不太了解他的意思.我真的需要进一步澄清.它可以解决我遇到的所有可怕错误.

I didn't really understand what he meant. I really need further clarification. It may solve all the horrible errors I have encountered.

这个问题"可能非常混乱,但是我别无选择,只能向更有经验的程序员寻求帮助...

This "question" may be super messy but I have no choice other than ask more experienced programmers for help...

别这么快就放弃我:3

Don't give up on me this quickly :3

推荐答案

就像您一样,我已经尝试了许多小时,最后的问题是我的库文件是x64,并且我在Visual Studio中设置了x86 (在主窗口中,位于调试"按钮的左侧).万一有帮助

I've been trying for many hours, just like you and, at the end the problem was that my libs are x64 and I had set x86 in Visual Studio (on the main window, to the left of the button Debug). In case it could help

这篇关于Microsoft Visual Studio 2017中的wxWidgets设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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