[CMake] Cannot find appropriate C++ compiler on this system ...
Bill Hoffman
bill.hoffman at kitware.com
Thu Sep 29 22:17:51 EDT 2011
On 9/29/2011 10:03 PM, Albretch Mueller wrote:
> On 9/29/11, Eric Noulard<eric.noulard at gmail.com> wrote:
>>
>> gcc is a C compiler not a C++ compiler.
>>
>> Do you have 'g++" installed?
>>
>> What does
>>
>> g++ --version says?
>
> $ g++ --version
> bash: g++: command not found
>
> but I definitely have a c++ compiler installed
>
> $ which cpp
> /usr/bin/cpp
>
> $ cpp --version
> cpp (Debian 4.3.4-6) 4.3.4
> Copyright (C) 2008 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
> $ ls -l /usr/bin/cpp
> lrwxrwxrwx 1 root root 7 Nov 5 2009 /usr/bin/cpp -> cpp-4.3
>
> $ ls -l /usr/bin/cpp-4.3
> -rwxr-xr-x 1 root root 214024 Nov 2 2009 /usr/bin/cpp-4.3
>
> so what should I do?
cpp is not a C++ compiler. It is a "C" preprocessor (cpp). You need
to install g++ on your system if you want to compile c++ code.
-Bill
More information about the CMake
mailing list