Using "#include" directive with relative filepaths

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Using "#include" directive with relative filepaths

2,069 次查看
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 回复数

585 次查看
UcTechnoGeek
Contributor II
Subfolder is easy. 

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

It always works for me...
0 项奖励

585 次查看
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 项奖励