sách gpt4 ai đã đi

c - VS 2017 + cmake + 忍者 + mingw

In lại 作者:太空宇宙 更新时间:2023-11-04 03:18:57 26 4
mua khóa gpt4 Nike

我正在使用 VS 2017 的新“打开文件夹”功能,通过 CmakeSettings.json 自动构建 cmake。

代码是用C11写的,所以我需要用gcc(来自mingw-64)编译。我创建了一个新的 cmake 配置,如下所示:

{
"name": "GNU-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "msvc_x64_x64" ],
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
"variables": [
{
"name": "CMAKE_MAKE_PROGRAM",
"value": "C:\\msys64\\mingw64\\bin\\mingw32-make.exe"
},
{
"name": "CMAKE_C_COMPILER",
"value": "C:\\msys64\\mingw64\\bin\\gcc.exe"
},
{
"name": "CMAKE_CXX_COMPILER",
"value": "C:\\msys64\\mingw64\\bin\\g++.exe"
}
]
}

输出看起来像这样:

The detected version of Ninja (GNU Make 4.2.1 Built for x86_64-w64-mingw32 Copyright (C) 1988-2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.) is less than the version of Ninja required by CMake (1.3).

这很奇怪,考虑到检测到的忍者版本应该是一个数字。 VS 的 ninja 和 MinGW ninja 都是最新的 (1.8.2)。

有没有其他方法可以让 MinGW + CMake 在 VS 2017 中工作?

1 Câu trả lời

原来我不得不重新启动 VS...一切都按预期进行。

关于c - VS 2017 + cmake + 忍者 + mingw,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48407391/

26 4 0
Bài viết được đề xuất: python - 检查登录状态 flask
Bài viết được đề xuất: node.js - Lambda 函数未返回对 Alexa 技能的响应
Bài viết được đề xuất: javascript - Node js Stripe 收到未知参数 : dob
Bài viết được đề xuất: c - 如何从终端用 C 语言逐行读取文件?
太空宇宙
Hồ sơ cá nhân

Tôi là một lập trình viên xuất sắc, rất giỏi!

Nhận phiếu giảm giá Didi Taxi miễn phí
Mã giảm giá Didi Taxi
Giấy chứng nhận ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com