0

everyone! I am learning to use eclipse CDT to develop codes in c++ recently. I have installed eclipse on my ubuntu 16.04. When I started eclipse in terminal, I got the output:

(base) ...@...-VirtualBox:~$ eclipse
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Unable to find full path for "gcc"
Unable to find full path for "g++"
Unable to find full path for "gcc"
Unable to find full path for "g++"

The eclipse application still can work though. Then when I tried to build my hello.world.cpp in eclipse, it reports:

Configuring in: /home/.../eclipse-workspace/test01/build/default
cmake -G Unix Makefiles -DCMAKE_EXPORT_COMPILE_COMMANDS=ON /home/.../eclipse-workspace/test01
Error: build command 'cmake' not foundFailure running cmake: 

I have installed gcc/g++ too. Below are my output in terminal to find gcc/g++ dir:

(base) ...@...-VirtualBox:~$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
Copyright (C) 2015 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.

(base) ...@...-VirtualBox:~$ g++ --version
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
Copyright (C) 2015 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.

(base) ...@...-VirtualBox:~$ which gcc
/usr/bin/gcc
(base) ...@...-VirtualBox:~$ which g++
/usr/bin/g++

I only have limited knowledge about compiling/configuration (and I am new to eclipse), so maybe my question is a little stupid. I have searched on the internet but those information cannot solve my problem. Can anyone help me? Thanks in advance.

adding: I think my question is not the same as those which "already have answers". I checked them and found that they are mostly about windows system. I doubt if they would also work in ubuntu and I have to say I did not find answers to my questions (I tried some methods and failed ). Still hoping to get help.

Jackie
  • 1
  • 1
  • 1
    Are you following these installation instructions: https://linuxconfig.org/eclipse-ide-for-c-c-developers-installation-on-ubuntu-20-04 – Eljay May 02 '21 at 12:30
  • @Eljay Thank you for your reply. Actually, I installed eclipse according to another guide:https://computingforgeeks.com/install-latest-eclipse-ide-on-ubuntu/ – Jackie May 02 '21 at 14:34
  • @howlger I found that this question was closed. I checked those so-called "already has answers here" and found that those are about windows system. I doubt if they are the same as ubuntu and I did not find answers to my questions (I tried some methods and failed ). So could you please help me with this? Thank you in advance. – Jackie May 02 '21 at 14:46
  • @Jackie Unfortunately, I do not have the power to undo the closing done by someone else. But I voted to reopen it. Please edit your question, with an explanation of why it is not a duplicate (if you edit a question after it is closed, it is automatically queued and others have to decide based on the edit). – howlger May 02 '21 at 15:20

0 Answers0