Using "#include" directive with relative filepaths

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using "#include" directive with relative filepaths

2,013 Views
Stephen
Contributor III
I have inherited a set of source files, with some being located in sub folders of the "Sources" folder. They all relate to controlling a USB On The Go chip via the SPI.
 
These have previously been compiled using the IAR compiler.
They contain relative pathname references to header files, of the form:
#include "../../hcc_types.h"
#include "spiu/spiu.h"
 
Before I resort to completely rewriting everything with full pathnames, could anyone tell me if there is an option I need to set in the Project Settings options or IDE preferences that enables the compiler to handle these relative refernces?
 
Labels (1)
0 Kudos
2 Replies

529 Views
UcTechnoGeek
Contributor II
Subfolder is easy. 

Just add a path from the source folder:
INCLUDE "\MC6805\EPRM24XX.ASM"

It always works for me...
0 Kudos

529 Views
Voxan
Contributor III
Hi there,

yes there is, I would recommend that you read the ACCESS PATHS settings panel description in the IDE manual.

hope this helps...

Regards
0 Kudos