Ich habe Probleme, CMAKE dazu zu bringen, ein grundlegendes Projekt im Visual Studio -Code zu kompilieren. Hier ist der Fehler, den ich erhalte: < /p>
[driver] Switching to package preset: __defaultPackagePreset__
[driver] Switching to workflow preset: __defaultWorkflowPreset__
[cmake] -- The C compiler identification is unknown
[cmake] -- The CXX compiler identification is unknown
[cmake] CMake Error at CMakeLists.txt:2 (project):
[cmake] The CMAKE_C_COMPILER:
[cmake]
[cmake] C:/msys64/mingw64/bin/gcc.exe
[cmake]
[cmake] is not a full path and was not found in the PATH.
[cmake]
[cmake] Tell CMake where to find the compiler by setting either the environment
[cmake] variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
[cmake] the compiler, or to the compiler name if it is in the PATH.
[cmake]
[cmake]
[cmake] CMake Error at CMakeLists.txt:2 (project):
[cmake] The CMAKE_CXX_COMPILER:
[cmake]
[cmake] C:/msys64/mingw64/bin/g++.exe
[cmake]
[cmake] is not a full path and was not found in the PATH.
[cmake]
[cmake] Tell CMake where to find the compiler by setting either the environment
[cmake] variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
[cmake] to the compiler, or to the compiler name if it is in the PATH.
[cmake]
[cmake]
[cmake] -- Configuring incomplete, errors occurred!
[proc] The command: C:\msys64\usr\bin\cmake.exe -DCMAKE_INSTALL_PREFIX=C:/Users/hanne/Documents/_Projects/LearningCpp/CMake_HelloWorld/out/install/default -DCMAKE_C_COMPILER=C:/msys64/mingw64/bin/gcc.exe -DCMAKE_CXX_COMPILER=C:/msys64/mingw64/bin/g++.exe -DCMAKE_BUILD_TYPE=Debug -SC:/Users/hanne/Documents/_Projects/LearningCpp/CMake_HelloWorld -BC:/Users/hanne/Documents/_Projects/LearningCpp/CMake_HelloWorld/out/build/default -G "Unix Makefiles" exited with code: 1
< /code>
Eine Benachrichtigung aus der CMAKE -Erweiterung in VSC besagt Folgendes: < /p>
Konfigurieren Sie fehlgeschlagen. Möchten Sie versuchen, mit dem CMake-Debugger zu konfigurieren? Auch aus dem Terminal bestätigt, dass G ++, GCC und GDB zugänglich sind, und bestätigten die c: \ msys64 \ ucrt64 \ bin und c: \ msys64 \ usr \ bin befinden sich auf meinem Pfad (Umgebungsvariable). Ich habe auch C: \ cygwin64 \ bin auf dem Pfad, aber es schien keinen Einfluss zu haben (auch versuchte, CMake zu leiten: Clear Cache and Rekonfiguration, ohne Erfolg).>
So verwenden Sie CMake (Visual Studio Code) richtig. ⇐ C++
-
- Similar Topics
- Replies
- Views
- Last post