Using "#include" directive with relative filepaths

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Using "#include" directive with relative filepaths

2,312件の閲覧回数
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?
 
ラベル(1)
0 件の賞賛
返信
2 返答(返信)

828件の閲覧回数
UcTechnoGeek
Contributor II
Subfolder is easy. 

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

It always works for me...
0 件の賞賛
返信

828件の閲覧回数
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 件の賞賛
返信