Ask Your Question

"No CMAKE_CXX_COMPILER could be found" KDevelop Error

asked 2015-01-02 17:36:46 -0500

cr85 gravatar image

updated 2015-01-02 20:14:39 -0500

mether gravatar image

Hi, i have a big problems with any IDE installed on my Fedora 21. Neither of them can compile my C program...I have no idea what's wrong,I have installed all needed packages and it is still the same problem:


/home/2/Documents/C projects/Exercises/First/First/build> /usr/bin/cmake -DCMAKE_INSTALL_PREFIX=/usr/share/cmake '-DCMAKE_BUILD_TYPE=Debug Release' '/home/2/Documents/C projects/Exercises/First/First/' -- The CXX compiler identification is unknown CMake Error at CMakeLists.txt:2 (project): No CMAKE_CXX_COMPILER could be found.

Tell CMake where to find the compiler by setting either the environment variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.

-- Configuring incomplete, errors occurred! See also "/home/2/Documents/C projects/Exercises/First/First/build/CMakeFiles/CMakeOutput.log". See also "/home/2/Documents/C projects/Exercises/First/First/build/CMakeFiles/CMakeError.log". * Failure: Exit code 1 *


Please help me,I am new in Linux OS and on Windows OS I have never had such problems...

edit retag flag offensive close merge delete


Anyone? Please do not leave me alone with this problem...

cr85 gravatar imagecr85 ( 2015-01-03 12:51:14 -0500 )edit

did you try sudo dnf install gcc ?

SantoshHoropter gravatar imageSantoshHoropter ( 2015-01-03 16:07:07 -0500 )edit

yeap,its installed

cr85 gravatar imagecr85 ( 2015-01-06 00:23:28 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted

answered 2015-01-04 01:48:05 -0500

davidva gravatar image

updated 2015-01-04 02:25:40 -0500

No CMAKE_CXX_COMPILER could be found

. install qt-devel..


yum -y install qt-devel cmake
edit flag offensive delete link more


installed - nothing changed

cr85 gravatar imagecr85 ( 2015-01-06 00:24:17 -0500 )edit

answered 2016-01-23 12:37:03 -0500

i90rr gravatar image

Try installing gcc and gcc-c++.

Ref: link text

edit flag offensive delete link more

answered 2015-01-03 15:23:37 -0500

cr85 gravatar image

I figured out that I need to use "cmake -DCMAKE_C_COMPILER=/usr/bin/gcc" and "cmake -DCMAKE_CXX_COMPILER=/usr/bin/g++" commands to set this compiler but it doesn't work too. If I use it,terminal give me back another error :

"CMake Error: The source directory "/home/2" does not appear to contain CMakeLists.txt".

So what's going on now? I'm pretty sure that /usr/bin/ directory is appropriate directory for gcc,because I checked it with "which gcc" comand. Any solution?

edit flag offensive delete link more


share your source code... You will receive help...

davidva gravatar imagedavidva ( 2015-01-05 00:05:42 -0500 )edit

How can i do that? Should I coppy all commands and responses from terminal or what? (sorry for stupid qestion but I am completely new Linux user)

cr85 gravatar imagecr85 ( 2015-01-06 00:27:18 -0500 )edit

Put your project on GitHub or Gitorious with a friendly license :)

randomuser gravatar imagerandomuser ( 2015-01-06 07:57:54 -0500 )edit

CMAKE_CXX... needs gcc-c++ installed. I just ran into the same issue and sudo yum -y install gcc-c++ fixes it.

wilf gravatar imagewilf ( 2015-04-27 07:56:00 -0500 )edit

The comment above is correct. You need to install gcc-c++ It's looking for a suitable compiler from the makelists

IanNeilsen gravatar imageIanNeilsen ( 2016-12-17 04:19:07 -0500 )edit

Question Tools


Asked: 2015-01-02 17:36:46 -0500

Seen: 42,929 times

Last updated: Jan 04 '15