n*****w 发帖数: 14 | 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. | q*******t 发帖数: 29 | 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.
| n*****w 发帖数: 14 | 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
| q*******t 发帖数: 29 | 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?
| w*****n 发帖数: 94 | 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
|
|