繁体   English   中英

无法在 Windows 上使用 CMake 构建 open62541

[英]Failure to build open62541 with CMake on Windows

我正在尝试使用 CMake 在 Windows 上构建库。 整个过程对我来说是新的,所以请原谅这个基本问题。 我按照当前 open62541 手册(版本 1.2.0-rc2-45-gf4270ceb)的 2.1.2 下的说明进行操作。 执行cmake.exe ,出现以下错误:

<path-to>\open62541\build>"C:\Program Files\CMake\bin\cmake.exe" .. -G "Visual Studio 14 2015"
-- Selecting Windows SDK version  to target Windows 10.0.19043.
CMake Error at CMakeLists.txt:5 (project):
  Failed to run MSBuild command:

    MSBuild.exe

  to get the value of VCTargetsPath:

    Das System kann die angegebene Datei nicht finden



-- Configuring incomplete, errors occurred!

最后的德语句子翻译为The system cannot find the specified file

我在我的计算机上找到了几个名为MSBuild.exe文件,并将它们全部添加到 PATH 环境中。 这并没有解决问题。

我尝试使用预构建的单个文件,但据我所知,这些是针对 Linux 系统的,不能用于 Windows,对吗?

非常感谢我如何继续获得工作构建的任何输入。 谢谢!

[编辑:]我能够通过做两件事来继续构建过程:

  • 在命令中将 Visual Studio 版本更改为当前版本 ( Visual Studio 16 2019 )
  • 在 Visual Studio 中安装了 Windows 10 SDK,如下所示

现在我被困在手册中说的步骤“然后在 Visual Studio 2015 中打开buildopen62541.sln并照常构建。” 任何提示我到底应该做什么?

.sln文件上运行 Visual Studio 意味着在 VS 中打开它,然后单击菜单栏中的Build ,然后单击Build solution 这对我来说是新的,感谢大家向我暗示正确的方向。

暂无
暂无

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

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