Reputation: 109
i build a so file in Android.bp,i use the "include_dirs" to find the ".h" file,but it can not find,here is my code
codeA named A.bp
cc_library_static {name :"liba" , static_libs:['libb']}
codeB name B.bp
cc_library_static {name :"libb",include_dirs:['vendor/dirb']}
there is a file named "b.h" in the dir "vendor/dirb"
when i build liba,it got error with "can not find b.h",how to solve it? thank you
Upvotes: 1
Views: 1884
Reputation: 2036
You have to use export_include_dirs
in B.bp
. But be sure to specify a path relative to B.bp
there.
include_dirs
is meant to add additional include directories that are not provided by dependent modules.
Note: cc_library_static
will create a static library (.a
file). Use cc_library_shared
instead if you want to have a shared library (.so
file).
Upvotes: 1