From Scratch, Run a c++ program in eclipse

Nilisha patil
4 min readMar 17, 2021

NOW, IT IS TIME TO COMPILE AND RUN YOUR C/C++ PROGRAM SUCCESSFULLY,

FOLLOW STEPS !!!

STEP 1: SAVE YOUR SOURCE CODE

TO ensure, whether your source code has error or not,

STEP 2: BUILD CODE TOOL

  • Right click , on your project name
  • it will give you , A menu bar , in which you have to click on “Build Configuration drop bar” menu .
  • then, click on “Build all” option.
  • it will give you following format type of information,
output of build tool
  • it will tell you , number of errors in your code and if there is no error then it will say 0 errors.

STEP 3: SET THE RUN CONFIGURATIONS

  • CLICK ON ‘RUN — DROP DOWN ’ OPTION .
RUN DROP DOWN OPTION
CLICK ON run drop down button
  • click on — ‘Run Configuration’
  • below dialog box pops up
  • now, double click on “C/C++ Application”
  • NOW, this below dialog box pop up ,
  • here , you will see your , program name in the PROJECT bar and C/C++ APPLICATION bar show your path of your project to compile.
  • PROJECT NAME IS NOT SHOWN IN THE “PROJECT BAR”.

→click on ‘Browse..’

→below dialog box pop up

→click on your project file name and , then ‘click OK’ .

→ if in the C/C++ APPLICATION bar , if your project name is showing , i.e. you can run configuration are done!!!

→If it is not showing your project file name , then follow below steps :

  • If PROJECT FILE NAME NOT SHOWN IN THE C/C++ APPLICATION BAR

METHOD 1:

→click on “Search Project..”

→below, dialog box pop up

→Now, Select your file and ‘click OK’ .

  • Or you can also search your project file path .

METHOD 2: Search your project file path .

→click on “Browse” option in the C/C++ APPLICATION BAR.

→select your file

select your file

→open your file folder.

→Now, click on “Debug” folder.

→select your file , which is having “TYPE = shared library”.

→Now, click on “Open” Button.

→Below type of format will be shown in the APPLICATION C/C++ BAR.

  • now, click on the “APPLY Button” and then, click on “RUN Button”.
  • NOW, it will you give your PROGRAM OUTPUT on the console.
output of the hello world
  • how to open an existing Project File In Eclipse ?
Don’t Open a Project File From an “FILE” →“OPEN FILE”;

→ Always Open AN existing Project FILE from “IMPORT PROJECT FILE” ;

→Then , click on “General ” Folder

→General →click on ‘Existing Projects into workspace’ ; then click “NEXT”;

  • click on “Browse..” Button of ‘Select Root Directory:’ ;

→select the file folder and click on “OPEN” ;

→THEN , Click on “FINISH” ;

Hence, you will find your Project File in the project explorer Tab!!!

--

--