Adding a Source File

After creating a new project, you can add source files, then build and run your completed project. Follow these steps to add a hello.c source file to the helloworld project.

1.

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

2.

Select Window > Show View > C/C++ Projects to view the project files.

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 the next topic, Building a Project.