[cfe-dev] How to set project root directory while compiling a file using Clang

Xin Hwang patz.hwang at gmail.com
Sun Oct 19 23:06:29 PDT 2014


Anil,

One way is to add your project root to include path using
`-I${my_project_root}` so you can include them using relative path to
project root.

Regards
Xin Huang

On Mon, Oct 20, 2014 at 12:52 PM, Anil Kumar Enukollu
<akumar802 at yahoo.com> wrote:
> Hi,
>
> My C++ project root directory is /x/local/anilkumar/code/....
>
> I want to compile a file at /x/local/anilkumar/code/abc/abc_case1/test.cpp.
> Also note that I will be including the other header files with following way
> #include "abc/dba/check.h"
> #include "xyz/adbc/check2.h"
>
> Currently I am getting error find the files (check.h and check2.h) which are
> included while compiling test.cpp file using clang.
>
> Could you please let me know how to set the base directory path for my
> project for compiling using clang.
>
> Thanks
> Anil
>
>
>
> --
> View this message in context: http://clang-developers.42468.n3.nabble.com/How-to-set-project-root-directory-while-compiling-a-file-using-Clang-tp4042183.html
> Sent from the Clang Developers mailing list archive at Nabble.com.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev



More information about the cfe-dev mailing list