#include 相对路径问题求教 ( 积分: 50 )

F

fencius

Unregistered / Unconfirmed
GUEST, unregistred user!
比如现在是 /grandpa/dad/son/
/grandpa
/dad
/son
c.hxx
c.cpp
/other
b.hxx
b.cpp
/other
a.hxx
a.cpp
现在c.pp中要在#include 使用a.hxx b.hxx ,分别应该怎么指定路径,谢谢
比如要包含a.hxx,是不是#include "grandpa/a.hxx",可是这样试了,不行啊
 
比如现在是 /grandpa/dad/son/
/grandpa
/dad
/son
c.hxx
c.cpp
/other
b.hxx
b.cpp
/other
a.hxx
a.cpp
现在c.pp中要在#include 使用a.hxx b.hxx ,分别应该怎么指定路径,谢谢
比如要包含a.hxx,是不是#include "grandpa/a.hxx",可是这样试了,不行啊
 
使用了#include "../../a.hxx" 已经通过了,怎么样才可以不用通配符,减少搜索目录的时间呢,谢谢!
 
放在同一目录
 
文件比较多,就是想用文件夹按模块分开的
不过已经知道了,也同样谢谢热心的ak_2005
 
#include "../other/a.hxx"
这样,不知写错没?
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
994
import
I
D
回复
0
查看
1K
DelphiTeacher的专栏
D
顶部