Compiling C++ programs using Bloodshed Dev-C++ compiler

Here are instructions to compile C++ programs using Bloodshed Dev-C++ compiler, by way of "project", for two situations:

  1. Starting a new file and a new project
  2. Already having a file, and creating a new project

The Steps:

  1. Start Dev-C++.  The program is probably under C:\Dev-Cpp directory, and the program is devcpp.exe.  You will see an opening screen similar to the following.

     

  2. Click on the "New Project" button, which looks like and it is the left-most button under the top menu-bar.  Then you see a pop-up window as you see below.

  3. From there, there are 2 cases:

    a) If you are creating a new source code

    b) If you already have an existing source code (.cpp file).

    Follow the instruction for the case which applies.


     

    1. Case 1: If you are creating a new file (source code):

      Suppose you want to name the project "Assign1".  In the pop-up window, click on Console Application and type in "Assign1" in the Project options, Name.  Then click OK.  

      The next pop-up window will say "Create new project" in the window title.  Select any directory in which you like to place the project.  Say you select C:\temp\309.  Then the window should look like:

      Click on Save.  Then the pop-up screen disappears and you will see the following screen.

      Next, in the right pane (under (*) main.cpp) tab), type in a line "cout <<..." as highlighted below.

      Then hit the Save button, which looks like .  In the next pop-up windows, change the file name to "Assign1main.cpp", as below.  Then click on Save.  

      COMPILATION AND EXECUTION:
      Now you are ready to compile.  Click on the Compile button, which looks like .  As the compilation takes place, you see a small windon "Compile progress".  When it is finished, you see the window as below.  Click on Close.

      Then you execute the program by clicking on the Run button, which looks like .  You will see an MS-DOS window which looks like 

       


    2. Case 2: If you already have a file

      Suppose you already have a .cpp file called "Assign1main.cpp" under "C:\temp\309" directory (thus, the whole path is "C:\temp\309\Assign1main.cpp").  Also suppose you want to name the project "Assign1".  In the pop-up window, click on Empty Project and type in "Assign1" in the Project options, Name.  Then click OK

      The next pop-up window will say "Create new project" in the window title.  Select/goto C:\temp\309 and hit Save.  Then the window should look like:

      Next, click on "Add to project" button, which looks like .  Then select the .cpp file, "Assign1main.cpp" and click Open.

      In the left pane, under "Assign1", click on "Assign1main.cpp".  Then you see the content of the file in the right pane.

      Now the procedure for compilation and execution is the same as the first case (Case 1 new file).  Follow the direction from here.