使用cmake的正确方法是什么

发布于 2025-01-09 07:37:35 字数 677 浏览 1 评论 0原文

我遵循在 Windows 中编译软件的说明,如下所述: https://github.com/solvespace/solvespace< /a> .但是当我启动第一个 cmake 命令时,它指出以下内容:

$ cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-mingw64.cmake -DCMAKE_BUILD_TYPE=Release
CMake Error at CMakeLists.txt:42 (project):
  Running

   'nmake' '-?'

  failed with:

   Impossibile trovare il file specificato


-- Configuring incomplete, errors occurred!
See also "C:/Users/user/Documents/experiments/SolveSpaceFolder/solvespace/build/CMakeFiles/CMakeOutput.log".

我已经安装了 mingw64 并添加到 PATH,实际上它可以单独工作。而且我可以看到隐含了 nmake 。我就是不知道出了什么问题。

I was following instructions for compiling a software in windows as described here: https://github.com/solvespace/solvespace . But when i launch the first cmake command it points out the following :

$ cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-mingw64.cmake -DCMAKE_BUILD_TYPE=Release
CMake Error at CMakeLists.txt:42 (project):
  Running

   'nmake' '-?'

  failed with:

   Impossibile trovare il file specificato


-- Configuring incomplete, errors occurred!
See also "C:/Users/user/Documents/experiments/SolveSpaceFolder/solvespace/build/CMakeFiles/CMakeOutput.log".

i've alredy installed mingw64 and added to PATH, in fact it work alone. Moreover I can see that there is nmake implied. I just can't figure out what's the problem.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

温柔女人霸气范 2025-01-16 07:37:35

删除 CMakeCache.txt 并尝试设置生成器

cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-mingw64.cmake -DCMAKE_BUILD_TYPE=Release -G "MinGW Makefiles"

相关问题:CMake & Windows 上的 MinGW 编译,无需 -G“MinGW Makefiles”标志

Remove CMakeCache.txt and try to set the generator

cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-mingw64.cmake -DCMAKE_BUILD_TYPE=Release -G "MinGW Makefiles"

Related question: CMake & MinGW Compilation on Windows, without needing the -G "MinGW Makefiles" flag.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文