Issue
I'm new to programming and decided to learn C++. I just learned the Hello World program and I tried to program it myself. I installed Eclipse C++ and GCC compiler like this video showed me: https://www.youtube.com/watch?v=Ln1l8qSOBW0. I set the path to the C++.exe program in the bin section of the GCC folder in the C Drive. I just keep getting:
"Launching FirstProgram Debug" has encountered a problem . Error starting process.
no matter where I choose the path.
I installed the GCC in C:\Users\user\gcc
, yet I do not know what to do run the project correctly. I am able to build the program.
Thank you in advance.
Solution
The code you posted in your comment is incorrect for 2 reasons:
Firstly, your header file should be:
#include <iostream> // not std_lib_facilities.h
This header files is the standard header file included in all programs of c++. Its full name is input/output stream, and as the name suggests, it holds family of class templates and supporting functions in the C++ Standard Library that implement stream-based input/output capabilities (Obtained from: Input/output (C++))
Secondly, the line that produces output has an error: cout
does not have std::
attached to it. The std::
tag tells the compiler that the function cout
is a part of the namespace std. To fix this you can either add std::
before cout
, or you can include the line:
using namespace std;
just in between the include
statement and the int main()
line.
In the case that this does not fix the issue, then there could be something wrong in the way you have installed eclipse or the gcc compiler. In that case, I would recommend you to watch this video on YouTube: Eclipse IDE for C/C++ Developers - Download, Install, and Run | eitlearning.com. Note that this video is for a Windows Operating System.
This video takes you over the entire process of installing eclipse and its requisites. You can compare your installation process to the way the user in the video has done it to see if you missed a step or if you did something wrong.
Good luck!
Answered By - BusyProgrammer
Answer Checked By - Willingham (JavaFixing Volunteer)