Adding a C Source File

After Creating a New Project, you can add additional source files, then build and run your completed project.

If, however, you chose to create a project type of Empty project for the hello_world project, you would follow these steps to add a hello.c source file to the hello_world project.


  1. Select the hello_world project in the Project Explorer view.

  2. From the Eclipse* File menu, select New > Source File. Enter hello.c in the Source File text box of the New Source File dialog. Click Finish to add the file to the hello_world project.

  3. In the Editor view, add your code for hello.c.

When your code is complete, save your file using File > Save, then proceed to Building a Project.