CCS News

Hints for File Directory Searching in the CCS C Compiler

Tuesday 19 June, 2012

Are you frustrated when the compiler cannot find an included file, or when the wrong file is being used? CCS has taken some of the mystery out of it and compiled some tips to help you out!

1.) Directory List specified in the IDE → Checked first in the IDE only

2.) Directory List specified in the Command-Line → Checked first in the Command-line only

3.) Directory List in CCSC.INI → Checked first in the Command-line and MPLAB only

4.) Directories identified in previous #include directives → Searched in the order they appear in the program

5.) Project Directory → When "..." is used in the #include, instead of <...>, then Project Directory is checked first


When the file is NOT found, the compiler will list each directory searched for the file, in the order they were searched, in the .ERR file. If the wrong file is used, the compiler can help by intentionally misspelling the name so you can see the search order in the .ERR file. Also, in any CCS C Compiler project each included file is listed in the .SYM file, along with the file's date/time and a 32-bit CRC.

Resources
To learn more about CCS's C Compiler, visit Our Compiler Page

To see more helpful hints and tips, visit Our Forum and Our FAQ page

Follow us on Facebook and Twitter