Reputation: 109
I am trying to build c file included by ndk under cygwin
In Android.mk, I add -I/usr/include to LOCAL_FLAGS like
LOCAL_FLAGS := -I/usr/include
And I have checked that openssl does under /usr/include
But when I run ndk-build under by project dir, it output
"fatal error: openssl/ssl.h: No such file or directory"
I think I have specified the include directory, but not solve this problem.
Is there any other way can I try?
Upvotes: 0
Views: 660
Reputation: 3540
You seem to have some gaps in your knowledge:
compile
, it cross-compiles
. It means that the NDK runs on the build machine, but the executable it produces cannot run on the build machine(different instruction sets)./lib
, /usr/lib
, /lib64
or /usr/lib64
What you need to do is build your own openssl
using the NDK and use that to link against when you build your executable.
Please note that the answer is missing a lot of information (at least 3 Bachelor's level Computer Science courses worth of information).
Upvotes: 1