avatar
how to set include PATH# Unix - 噫吁兮,危乎高哉
n*w
1
Another question:
I need to run C/C++ programs using CRSP for my research. CRSP related
stuff is located at /opt/crsp/. Specifically, I need to include a bunch of
header files (.h) located at /opt/crsp/include/ in my C/C++ programs, and
I want them to be able to include that path by default, i.e., without
having to specify the absolute path in each #include.
I tried to change PATH but it didn't work. Is there anything like
INCLUDEPATH? Thanks a lot.
avatar
q*t
2
gcc -I$INCLUDE_PATH

【在 n*****w 的大作中提到】
: Another question:
: I need to run C/C++ programs using CRSP for my research. CRSP related
: stuff is located at /opt/crsp/. Specifically, I need to include a bunch of
: header files (.h) located at /opt/crsp/include/ in my C/C++ programs, and
: I want them to be able to include that path by default, i.e., without
: having to specify the absolute path in each #include.
: I tried to change PATH but it didn't work. Is there anything like
: INCLUDEPATH? Thanks a lot.

avatar
n*w
3
Thanks. But the problem is, using -I, I can only save by writing
#include "crsp.h" instead of #include "/opt/crsp/include/crsp.h".
But "crsp.h" itself has a bunch of other #include "crsp_xyb.h".
What shall I do?

【在 q*******t 的大作中提到】
: gcc -I$INCLUDE_PATH
avatar
q*t
4
try include
【在 n*****w 的大作中提到】
: Thanks. But the problem is, using -I, I can only save by writing
: #include "crsp.h" instead of #include "/opt/crsp/include/crsp.h".
: But "crsp.h" itself has a bunch of other #include "crsp_xyb.h".
: What shall I do?

avatar
w*n
5
that's not necessary, cause crsp_xyb.h is includes by crsp.h,
just make sure path of crsp_xyb.h in included with a -I.

【在 q*******t 的大作中提到】
: try include
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。