2017-09-02 10 views
-1

Ich bin ein Anfänger in der Programmierung mit C und ich diesen Code Fehler, wenn ich ein Projekt auf CLION starten:CMAKE ERROR mit CLION

C:\Program Files\JetBrains\CLion 2017.2.2\bin\cmake\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - MinGW Makefiles" C:\Users\danie\CLionProjects\untitled2 
-- The C compiler identification is GNU 5.3.0 
-- The CXX compiler identification is unknown 
-- Check for working C compiler: C:/MinGW/bin/gcc.exe 
-- Check for working C compiler: C:/MinGW/bin/gcc.exe -- works 
-- Detecting C compiler ABI info 
-- Detecting C compiler ABI info - done 
-- Detecting C compile features 
-- Detecting C compile features - done 
CMake Error at CMakeLists.txt:2 (project): 
    The CMAKE_CXX_COMPILER: 

g++.exe 

is not a full path and was not found in the PATH. 

CMake sagen, wo den Compiler zu finden, indem entweder die Umwelt variable Einstellung "CXX" oder der CMake-Cache-Eintrag CMAKE_CXX_COMPILER an den vollständigen Pfad an den Compiler oder an den Compilernamen, wenn er im PATH enthalten ist.

-- Configuring incomplete, errors occurred! 
See also "C:/Users/danie/CLionProjects/untitled2/cmake-build-debug/CMakeFiles/CMakeOutput.log". 
See also "C:/Users/danie/CLionProjects/untitled2/cmake-build-debug/CMakeFiles/CMakeError.log". 

[Finished]

Was kann ich tun, um es zu arbeiten? Vielen Dank für Ihre Hilfe.

+0

Es scheint, dass Sie einen C-Compiler installiert haben ('gcc'), aber keine C++ Compiler (' g ++ '). –

+0

Ich programmiere in C, also brauche ich keinen C++ Compiler. –

Antwort

3

Standardmäßig erwartet CMake, dass das Projekt Unterstützung für C und C++ benötigt. Wenn Ihr Projekt nur C muss, angeben, dass in project() Aufruf:

project(<project-name> C)