Closed dkhanchopoulo closed 7 years ago
When my application is compiled: pem_lib.c:function PEM_def_callback: error: undefined reference to 'stderr'
armeabi-v7a/libcrypto.a(c_zlib.o):c_zlib.c:function zlib_stateful_expand_block: error: undefined reference to 'inflate'
finally when I add zlib in my test project the only case is missing:
../../../../libs/armeabi-v7a/libcrypto.a(cryptlib.o):cryptlib.c:function OPENSSL_showfatal: error: undefined reference to 'stderr' ../../../../libs/armeabi-v7a/libcrypto.a(pem_lib.o):pem_lib.c:function PEM_def_callback: error: undefined reference to 'stderr' ../../../../libs/armeabi-v7a/libcrypto.a(eng_openssl.o):eng_openssl.c:function openssl_load_privkey: error: undefined reference to 'stderr' ../../../../libs/armeabi-v7a/libcrypto.a(eng_openssl.o):eng_openssl.c:function test_rc4_init_key: error: undefined reference to 'stderr' ../../../../libs/armeabi-v7a/libcrypto.a(ui_openssl.o):ui_openssl.c:function close_console: error: undefined reference to 'stdin' ../../../../libs/armeabi-v7a/libcrypto.a(ui_openssl.o):ui_openssl.c:function open_console: error: undefined reference to 'stdin' clang++: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed.
Which Android API version do you use ?
android API 21. I find the reason. It is connected to NDK 15, If i use NDK 14, there is no issue.
OK cool, I update my readme to explain it
Dear leenjewel,
kindly assist which NDK version I have use for build /build-openssl4android.sh
I tried with NDK-15 and g++ compiler
apps/ca.o: In function
do_body': ca.c:(.text.unlikely+0x1108): undefined reference to
stdin' apps/openssl.o: In functionmain': openssl.c:(.text.startup+0x1c8): undefined reference to
stpcpy' openssl.c:(.text.startup+0x21c): undefined reference tosignal' apps/ca.o: In function
do_body': ca.c:(.text.unlikely+0x1108): undefined reference tostdin' apps/openssl.o: In function
main': openssl.c:(.text.startup+0x1c8): undefined reference tostpcpy' openssl.c:(.text.startup+0x21c): undefined reference to
signal':ui_openssl.c:function open_console: error: undefined reference to 'stdin'