I have installed Eclipse via System Workbench for STM32. Meaning I have an icon now named System Workbench for STM32, and when I open it Eclipse opens.

With that IDE I can successfully create programs for the microicontroller STM32.

However, I want to make unit tests which I can run on a PC, and while after installing google test/mock I get the error:

/usr/bin/sh: g++: command not found

I get the same problem when I make a generic C++ project (either with GNU auto toolchain or using a G++ Cross compiler, or using the default C++ Hello World project).

Also, I do not see an Includes folder.

However, when I check in Help/About Eclipse, I see that Eclipse CDT is installed (version

How can I compile C++ application for PC only? Should I install something more, and from where/how?


This may happen when gcc is not installed or not configured correctly.

Do a

sudo apt update

And also a

sudo apt install gcc

If this works, great!

| improve this answer | |
  • I don't have Linux or Unix (so sudo does not work). – Michel Keijzers Nov 26 '17 at 20:05
  • The directory /usr/bin exists for Unix and Unix like operating systems. Are you sure you've downloaded eclipse for your operating system? – Paddy Dec 3 '17 at 8:45
  • Sorry for the late answer; guess I loaded it for the wrong one; now it seems good. I accept your answer since it lead to the solution. – Michel Keijzers Sep 8 '19 at 19:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.