Download Getting Started Guide - v2.1 RH850 C Compiler

Transcript
Setting up a Project
Remove a file or link from your project
As we do not need this file for the remainder of this tutorial, we can safely remove it again from the project:
• In the C/C++ Projects view, right-click on the file link2existing.c and select Delete.
The link link2existing.c is no longer part of your project and has been removed from your project
folder. The original file, however, remains untouched at its original location.
• In the C/C++ Projects view, right-click on the file existing.c and select Delete.
The file existing.c is no longer part of your project and has been removed from your project folder.
Be aware that when you remove a file from your project, it always will be removed from its location
in the project folder on your hard disk too!
3.4. Editing Files: C/C++ Editor
Editing a file
Enter the following simple C source in your new source document (the code deliberately contains a
mistake, which you will correct later on):
#include <stdio.h>
int main( void )
{
printf( "Hello World\n" )
}
/* <- missing semicolon */
Note the following:
• The tab label of the editor view shows an asterisk in front of the file name (*myfile.c) to indicate that
the file has been modified.
• The C/C++ editor view uses syntax coloring.
• The Outline view shows the structure of the file. You can use this view to navigate through (larger)
source files easily. Alternatively you can expand the structure of the file in the C/C++ Projects view.
• Right-clicking in the editor view presents you with a list of menu commands.
• To receive more help about the editor view, make sure it is active and press F1.
Saving and closing a file
To save the file:
• From the File menu, select Save (Ctrl+S).
17