Я занимаюсь разработкой под Windows 11 и использую Visual Studio Code в качестве редактора. До сих пор мне удавалось скомпилировать свой проект, выполнив в терминале следующее:
Код: Выделить всё
cmake -B build -S .\cyclopsTetrahedralizer\
msbuild .\build\CyclopsTetrahedralizer.sln
Если я выберу Teriminal > Запустить задачу сборки... > CMake:Build, в терминале будет напечатано следующее:
Код: Выделить всё
* Executing task: CMake: build
Workspace is /x:/dev/github.com/blackears/cyclopsTessellate
build task started....
"C:\Program Files\CMake\bin\cmake.EXE" --build --config Debug --target all --
Error: not a CMake build directory (missing CMakeCache.txt)
build finished with error(s).
* The terminal process failed to launch (exit code: 1).
* Terminal will be reused by tasks, press any key to close it.
Я также создал файл launch.json, чтобы попытаться запустить свой исполняемый файл:
Код: Выделить всё
{
"version": "0.2.0",
"configurations": [
{
"name": "(Windows) Launch - cube",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/build/Debug/cyclopsTetrahedralizer.exe",
"args": [
"--output", "${workspaceFolder}/testing/cube_tetrahedra.obj",
"${workspaceFolder}/assets/cube.obj"
],
"symbolSearchPath": "${workspaceFolder}/build/Debug/",
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"console": "externalTerminal"
},
]
}
Я новичок в Cmake и не очень часто использую код Visual Studio. Что мне нужно сделать, чтобы иметь возможность создать и запустить проект с помощью Cmake/Visual Studio Code?
Подробнее здесь: https://stackoverflow.com/questions/798 ... an-run-and
Мобильная версия