简体   繁体   English

为VS2017构建OpenCascade

[英]Build OpenCascade for VS2017

Usecase: I intend to use the OpenCascade C++ library in my C++ project. 用例:我打算在我的C ++项目中使用OpenCascade C ++库。 I need to do simple polyline offsetting and polygon scaling down. 我需要做简单的折线偏移和多边形缩小。

So I am attempting to install the OpenCascade C++ library on my Windows 10 64bit machine to use in Visual Studio 17. My first attempt was to use the windows installer then run the batch files (env.bat, custom.bat). 因此,我尝试在Windows 10 64位计算机上安装OpenCascade C ++库以在Visual Studio 17中使用。我的第一次尝试是使用Windows安装程序,然后运行批处理文件(env.bat,custom.bat)。 But I have read on this forum that the windows installer wont work for Visual Studio 2017 - is that correct? 但是我已经在这个论坛阅读了Windows安装程序不适用于Visual Studio 2017的说法-正确吗?

So I have now followed the build instructions here . 因此,我现在按照此处的构建说明进行操作。 And now I have opened the sample projects in Visual Studio 2017. When I try to build the project I get the following errors for each of the sample projects: 现在,我已经在Visual Studio 2017中打开了示例项目。当我尝试构建项目时,对于每个示例项目都会遇到以下错误:

Error MSB8036 The Windows SDK version 8.1 was not found. 错误MSB8036找不到Windows SDK版本8.1。 Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution". 安装所需版本的Windows SDK或在项目属性页中更改SDK版本,或者通过右键单击解决方案并选择“重新定位解决方案”。 TKQADraw C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\Common7\\IDE\\VC\\VCTargets\\Platforms\\x64\\PlatformToolsets\\v141\\Toolset.targets 36 TKQADraw C:\\ Program Files(x86)\\ Microsoft Visual Studio \\ 2017 \\ Community \\ Common7 \\ IDE \\ VC \\ VCTargets \\ Platforms \\ x64 \\ PlatformToolsets \\ v141 \\ Toolset.targets 36

Any advice on what I have done wrong? 关于我做错了什么建议? Maybe I didn't build it properly following these steps ? 也许我没有按照以下步骤正确构建它? Also, given my usecase above, do I need to do all this if I just want to use OpenCascade in a limited way? 另外,鉴于上述用例,如果我只想以有限的方式使用OpenCascade,是否需要做所有这些事情?

Is there documentation or a link on how I create a new Visual Studio C++ project and link all the OpenCascade libraries? 是否存在有关如何创建新的Visual Studio C ++项目以及链接所有OpenCascade库的文档或链接?

As the error says, you haven't installed the correct SDK version, or maybe the version you installed is out dated. 如错误所示,您尚未安装正确的SDK版本,或者您安装的版本已过期。 Check the SDK install and try again. 检查SDK安装,然后重试。

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

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