Closed telenewbie closed 4 years ago
If you need to link statically the libs crypto/ssl with your binary , you should remove the lines forcing shared. In many cases it is preferable to deploy with your app the shared libs, and then the linker will use them if they are not exist in the android root. Most of android system have already the libs crypto and ssl.
thanks, because i want to ,finally, compile to one shared lib on my android app ,i must compile this with static . so i can compile with this
target_link_libraries(${PROJECT_NAME}
-Wl,--whole-archive
-lmad
-lbz2
-lcurl
-lz
-levent_extra
-ltag
-ltce
-ltxz_json
-lpcre
-lprotobuf
-ltxzOSAL
-lcrypto
-lprotos
-lssl
-levent_pthreads
-lopus
-levent_core
-Wl,--no-whole-archive
-ldl
-lpthread
)
and android app only use one shared lib to intergrated。
and i found the way to resolve:
must specify android-platform
-DANDROID_PLATFORM=android-19
output:
compile command:
/cross/github/jni/android-ndk-r14b/
is my android-ndk path.and how can i compile crypto with static option? i found this code on this project
on my demo project: