Topic: Issue linking to libwolfssl.a
Hello,
I am trying to build a static library for wolfssl for android using the ndk standalone toolchain. I believe I have built everything correclty, however when I go to link I get errors from the library.
/usr/local/lib/libwolfssl.a(src_libwolfssl_la-dh.o):dh.c:function wc_DhGenrateKeyPair: error: undefined reference to 'pow'
/usr/local/lib/libwolfssl.a(src_libwolfssl_la-dh.o):dh.c:function wc_DhGenrateKeyPair: error: undefined reference to 'log'
/usr/local/lib/libwolfssl.a(src_libwolfssl_la-dh.o):dh.c:function wc_DhGenrateKeyPair: error: undefined reference to 'pow'
I built like this:
./configure --enable-static --host=arm-linux-androideabi CC=/opt/android-toolchain/bin/arm-linux-androideabi-clang
make
sudo make install
then in my CMakeLists.txt I have:
add_executable(wolftest server.c)
target_include_directories(wolftest PRIVATE /usr/local/include)
target_link_libraries(wolftest /usr/local/lib/libwolfssl.a)
Am I missing something?