User manual
mikroC PRO for dsPIC
MikroElektronika
753
The list of relevant les is stored in the project le (extension .mcpds).
To add a le to the project, click the Add File to Project Icon  or press Insert button on your keyboard. Each 
added source le must be self-contained, i.e. it must have all necessary denitions after preprocessing.
To  remove  le(s)  from  the  project,  click  the  Remove  File  from  Project  Icon    or  press  Delete  button  on  your 
keyboard.
Project Level Denes:
Project Level Denes (.pld) les can also be added to project. Project level dene les enable you to have denes that 
are visible in all source les in the project. A le must contain one denition per line in the following form: 
<symbol>=<value>
Dene a macro named symbol. To specify a value, use =<value>. If =<value> is omitted, 1 is assumed. Do not enter 
white-space characters immediately before the “=”. If a white-space character is entered immediately after the “=”, the 
macro is dened as zero token. This option can be specied repeatedly. Each appearance of symbol will be replaced 
by the value before compilation.
For example, lets make a project level dene named pld_test. First of all, create a new le with the .pld extension, 
pld_test_le.pld. 
Next, open it, and write something like this:
pld_test=3
Once you have done this, save the le. In the Project Manager, add pld_test_le.pld le by right-clicking the 
Project Level Denes node.
In the source code write the following:
#if pld_test == 3
...
#endif
There are number of predened project level denes. See predened project level denes
Note: For inclusion of the header les (extension .h), use the preprocessor directive #include. See File Inclusion for 
more information. 
Related topics: Project Manager, Project Settings, Edit Project 










