I am trying to configure SDL2 for C ++ with Eclipse on Windows 7.
To do this, I follow the manual in this link , which says that I must first install MinGW. Therefore, to configure MinGW, I follow the link. I follow all the steps without any problems. Then I open Eclipse and try to create a simple hello world program:
#include <iostream> using namespace std; int main() { cout << "Hello World!" << endl; return 0; }
To my surprise, this code is not built with 6 errors.
Then I continue to simplify the program further:
int main() { return 0; }
It also does not compile. There are two errors:
- Program "g ++" not found in PATH
- Program "gcc" not found in PATH
Here is a screenshot. 
However, my path contains "C: \ mingw \ bin". I also tried changing this to "C: \ mingw". Looking in "C: \ mingw \ bin", I find gcc and g ++: 
In addition, compiling a test program using the command line (g ++ Test.cpp -o Test) works just fine, as does g ++ -v.
I have been working on the Internet for hours and cannot find an answer on why Eclipse cannot compile anything with MinGW. Questions that I looked at SO (which could not fix my problem) include:
Additional information: Window> Preferences> C / C ++> Build> Settings> "Settings of the built-in CDT GCC MinGW [Shared] commander": Toolchain MinGW GCC was not found in this system.
I also reinstalled Eclipse to no avail.
I understand that this may be a duplicate question about some of which I related, but the information in the previous questions could not fix my problem, and I am afraid that adding a comment to the old question may not lead to an answer.
Please request additional information as needed.