c++ - Libclang don't follow include statement -
i'm trying use libclang programatically analyse opencv library, when try import main header opencv opencv.hpp
, libclang won't follow path.
previously, reading quite beautifully, figured following $path
's headers, , want follow these specifics ones.
opencv.hpp
file containing lots of #include
statements so:
#include "core/core_c.h" #include "core/core.hpp" #include "flann/miniflann.hpp" // ... , on
but, when try open libclang
, or either clang ./opencv.hpp
, won't follow:
clang ./header_example/opencv.hpp ./header_example/opencv.hpp:46:10: fatal error: 'core/core_c.h' file not found #include "core/core_c.h" ^ 1 error generated.
but i'm sure on right directory (a bit of tree
output):
── header_example │ ├── opencv.hpp │ ├── opencv2 │ │ ├── # more directories │ │ ├── core │ │ │ ├── affine.hpp │ │ │ ├── core.hpp │ │ │ ├── core_c.h │ │ │ ├── types_c.h │ │ │ ├── version.hpp │ │ │ └── wimage.hpp
maybe i'm not using right clang
parameters?
a bit of context: want analyse opencv types, classes , functions, info present on headers, don't think need full library read code. when tried use full library found myself in trouble. need use ios compilation(?)version(?) of library, hence copy/pasted headers compiled version working directory (sorry? :) )
edit 1: may seem odd directories having opencv2/
, if remove headers inside of it, clang complain 'bout why aren't there: fatal error: 'opencv2/core/types_c.h' file not found
i had add -i.
before adding -i./opencv2
because had 1 file 1 same directory opencv.hpp
. gosh feel stupid missing this.
Comments
Post a Comment