Hi friends I am Using Ndk in My Project but while I am building the project got below exception
4) Error:(105) undefined reference to 'avcodec_register_all'
Error:(106) undefined reference to 'av_register_all'
Error:(107) undefined reference to 'av_log_set_callback'
Error:(109) undefined reference to 'avformat_alloc_context'
Error:(110) undefined reference to 'av_guess_format'
Error:(120) undefined reference to 'av_new_stream'
Error:(125) undefined reference to 'av_new_stream'
Error:(135) undefined reference to 'avcodec_find_encoder'
Error:(199) undefined reference to 'av_opt_set'
Error:(200) undefined reference to 'av_opt_set_int'
Error:(201) undefined reference to 'av_opt_set_int'
Error:(202) undefined reference to 'av_opt_set_int'
Error:(203) undefined reference to 'av_opt_set_int'
Error:(212) undefined reference to 'av_dict_set'
Error:(214) undefined reference to 'av_dict_set'
Error:(215) undefined reference to 'av_dict_set'
Error:(216) undefined reference to 'av_dict_set'
Error:(217) undefined reference to 'av_opt_set'
Error:(218) undefined reference to 'av_opt_set'
Error:(219) undefined reference to 'av_opt_set'
Error:(220) undefined reference to 'avcodec_open2'
Add bellow code in your app build.gradle file
productFlavors{
x86{
ndk{
abiFilter "x86"
}
}
enter code here
armv7a{
ndk{
abiFilter "armeabi-v7a"
}
}
}
Related
I experience the same error as has been described here: Android NDK make. Hundreds of "undefined reference error"s
However, after we use the solution we get another type of error:
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/stdexcept:136: error: undefined reference to 'std::logic_error::logic_error(char const*)'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/streambuf:302: error: undefined reference to 'std::__ndk1::locale::~locale()'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/streambuf:302: error: undefined reference to 'std::__ndk1::locale::~locale()'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/ios:683: error: undefined reference to 'std::__ndk1::ios_base::~ios_base()'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/ios:683: error: undefined reference to 'std::__ndk1::ios_base::~ios_base()'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/stdexcept:136: error: undefined reference to 'std::logic_error::logic_error(char const*)'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/streambuf:302: error: undefined reference to 'std::__ndk1::locale::~locale()'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/streambuf:302: error: undefined reference to 'std::__ndk1::locale::~locale()'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/ios:683: error: undefined reference to 'std::__ndk1::ios_base::~ios_base()'
../../../../src/main/jniLibs/armeabi-v7a/libcaffe2.a(Device.cpp.o):Device.cpp:function virtual thunk to std::__ndk1::basic_ostringstream<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >::~basic_ostringstream(): error: undefined reference to 'std::__ndk1::ios_base::~ios_base()'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/ios:529: error: undefined reference to 'std::__ndk1::ios_base::clear(unsigned int)'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/ios:529: error: undefined reference to 'std::__ndk1::ios_base::clear(unsigned int)'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/ostream:955: error: undefined reference to 'std::__ndk1::ios_base::__set_badbit_and_consider_rethrow()'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/ostream:461: error: undefined reference to 'std::__ndk1::ios_base::getloc() const'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/__locale:212: error: undefined reference to 'std::__ndk1::locale::use_facet(std::__ndk1::locale::id&) const'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/ios:756: error: undefined reference to 'std::__ndk1::ios_base::getloc() const'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/__locale:212: error: undefined reference to 'std::__ndk1::locale::use_facet(std::__ndk1::locale::id&) const'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/ios:529: error: undefined reference to 'std::__ndk1::ios_base::clear(unsigned int)'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/ostream:472: error: undefined reference to 'std::__ndk1::ios_base::__set_badbit_and_consider_rethrow()'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/ostream:461: error: undefined reference to 'std::__ndk1::num_put<char, std::__ndk1::ostreambuf_iterator<char, std::__ndk1::char_traits<char> > >::id'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/ostream:461: error: undefined reference to 'std::__ndk1::ctype<char>::id'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/istream:321: error: undefined reference to 'std::__ndk1::ios_base::getloc() const'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/__locale:212: error: undefined reference to 'std::__ndk1::locale::use_facet(std::__ndk1::locale::id&) const'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/ios:529: error: undefined reference to 'std::__ndk1::ios_base::clear(unsigned int)'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/streambuf:193: error: undefined reference to 'std::__ndk1::ctype<char>::id'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/istream:713: error: undefined reference to 'std::__ndk1::ios_base::getloc() const'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/__locale:212: error: undefined reference to 'std::__ndk1::locale::use_facet(std::__ndk1::locale::id&) const'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/istream:732: error: undefined reference to 'std::__ndk1::ios_base::__set_badbit_and_consider_rethrow()'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/istream:730: error: undefined reference to 'std::__ndk1::num_get<char, std::__ndk1::istreambuf_iterator<char, std::__ndk1::char_traits<char> > >::id'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/ostream:739: error: undefined reference to 'std::__ndk1::ios_base::__set_badbit_and_consider_rethrow()'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/ostream:737: error: undefined reference to 'std::__ndk1::ctype<char>::id'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/ios:690: error: undefined reference to 'std::__ndk1::ios_base::init(void*)'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/streambuf:311: error: undefined reference to 'std::__ndk1::locale::locale()'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/ios:690: error: undefined reference to 'std::__ndk1::ios_base::init(void*)'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/streambuf:311: error: undefined reference to 'std::__ndk1::locale::locale()'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/stdexcept:146: error: undefined reference to 'std::logic_error::logic_error(char const*)'
../../../../src/main/jniLibs/armeabi-v7a/libcaffe2.a(Device.cpp.o):Device.cpp:typeinfo for std::__ndk1::basic_ios<char, std::__ndk1::char_traits<char> >: error: undefined reference to 'typeinfo for std::__ndk1::ios_base'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/stdexcept:136: error: undefined reference to 'std::logic_error::logic_error(char const*)'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/ios:690: error: undefined reference to 'std::__ndk1::ios_base::init(void*)'
/home/augustinas/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/streambuf:311: error: undefined reference to 'std::__ndk1::locale::locale()'
We have built caffe2 from source and updated our application's CMakeLists.txt as follows:
cmake_minimum_required(VERSION 3.4.1)
add_library(
native-lib
SHARED
src/main/cpp/native-lib.cpp
)
find_library(
android-lib
android
)
include(AndroidNdkModules)
android_ndk_import_module_cpufeatures()
add_library(
caffe2
STATIC
IMPORTED
)
set_target_properties(
caffe2
PROPERTIES IMPORTED_LOCATION
${CMAKE_CURRENT_LIST_DIR}/src/main/jniLibs/${ANDROID_ABI}/libcaffe2.a
)
add_library(
thread_pool
STATIC
IMPORTED
)
set_target_properties(
thread_pool
PROPERTIES IMPORTED_LOCATION
${CMAKE_CURRENT_LIST_DIR}/src/main/jniLibs/${ANDROID_ABI}/libpthreadpool.a
)
add_library(
clog
SHARED
IMPORTED
)
set_target_properties(
clog
PROPERTIES IMPORTED_LOCATION
${CMAKE_CURRENT_LIST_DIR}/src/main/jniLibs/${ANDROID_ABI}/libclog.a
)
add_library(
protobuf
SHARED
IMPORTED
)
set_target_properties(
protobuf
PROPERTIES IMPORTED_LOCATION
${CMAKE_CURRENT_LIST_DIR}/src/main/jniLibs/${ANDROID_ABI}/libprotobuf.a
)
add_library(
NNPACK
STATIC
IMPORTED
)
set_target_properties(
NNPACK
PROPERTIES IMPORTED_LOCATION
${CMAKE_CURRENT_LIST_DIR}/src/main/jniLibs/${ANDROID_ABI}/libnnpack.a
)
include_directories( src/main/cpp )
find_library(
log-lib
log
)
target_link_libraries(
native-lib
-Wl,--whole-archive
caffe2
-Wl,--no-whole-archive
NNPACK
thread_pool
clog
protobuf
cpufeatures
${log-lib}
${android-lib})
Hello I am trying to compile pjsua for android video calling. After following steps on pjusa I am getting following errors.
../src/pjsua/pjsua_app_cli.c:1253: error: undefined reference to 'pjsua_conf_disconnect'
../src/pjsua/pjsua_app_cli.c:1277: error: undefined reference to 'pj_strncpy_with_null'
../src/pjsua/pjsua_app_cli.c:1279: error: undefined reference to 'pjsua_conf_adjust_rx_level'
../src/pjsua/pjsua_app_cli.c:1291: error: undefined reference to 'pjsua_conf_adjust_tx_level'
../src/pjsua/pjsua_app_cli.c:1314: error: undefined reference to 'pjsua_codec_set_priority'
../src/pjsua/pjsua_app_cli.c:1318: error: undefined reference to 'pjsua_vid_codec_set_priority'
../src/pjsua/pjsua_app_cli.c:1333: error: undefined reference to 'pjsua_get_state'
../src/pjsua/pjsua_app_cli.c:1335: error: undefined reference to 'pj_cli_get_cmd_id'
../src/pjsua/pjsua_app_cli.c:1353: error: undefined reference to 'pjsua_snd_get_setting'
../src/pjsua/pjsua_app_cli.c:1356: error: undefined reference to 'pj_perror_2'
../src/pjsua/pjsua_app_cli.c:1370: error: undefined reference to 'pjsua_snd_set_setting'
../src/pjsua/pjsua_app_cli.c:1372: error: undefined reference to 'pj_perror_4'
../src/pjsua/pjsua_app_cli.c:1383: error: undefined reference to 'pjsua_dump'
../src/pjsua/pjsua_app_cli.c:1394: error: undefined reference to 'pj_log_1'
../src/pjsua/pjsua_app_cli.c:1414: error: undefined reference to 'pj_log_1'
../src/pjsua/pjsua_app_cli.c:1419: error: undefined reference to 'pj_file_open'
../src/pjsua/pjsua_app_cli.c:1425: error: undefined reference to 'pj_file_write'
../src/pjsua/pjsua_app_cli.c:1426: error: undefined reference to 'pj_file_close'
../src/pjsua/pjsua_app_cli.c:1443: error: undefined reference to 'pjsua_get_state'
../src/pjsua/pjsua_app_cli.c:1473: error: undefined reference to 'pjsua_call_get_count'
../src/pjsua/pjsua_app_cli.c:1491: error: undefined reference to 'pj_strncpy'
../src/pjsua/pjsua_app_cli.c:1498: error: undefined reference to 'pjsua_msg_data_init'
../src/pjsua/pjsua_app_cli.c:1500: error: undefined reference to 'pjsua_call_make_call'
../src/pjsua/pjsua_app_cli.c:1514: error: undefined reference to 'pjsua_call_get_count'
../src/pjsua/pjsua_app_cli.c:1536: error: undefined reference to 'pj_strncpy'
../src/pjsua/pjsua_app_cli.c:1544: error: undefined reference to 'pjsua_call_make_call'
../src/pjsua/pjsua_app_cli.c:1583: error: undefined reference to 'pjsua_msg_data_init'
../src/pjsua/pjsua_app_cli.c:1594: error: undefined reference to 'pjsip_generic_string_hdr_init2'
../src/pjsua/pjsua_app_cli.c:1610: error: undefined reference to 'pjsua_call_answer2'
../src/pjsua/pjsua_app_cli.c:1623: error: undefined reference to 'pjsua_call_hangup_all'
../src/pjsua/pjsua_app_cli.c:1625: error: undefined reference to 'pjsua_call_hangup'
../src/pjsua/pjsua_app_cli.c:1634: error: undefined reference to 'pjsua_call_set_hold'
../src/pjsua/pjsua_app_cli.c:1650: error: undefined reference to 'pjsua_call_reinvite2'
../src/pjsua/pjsua_app_cli.c:1662: error: undefined reference to 'pjsua_call_update2'
../src/pjsua/pjsua_app_cli.c:1732: error: undefined reference to 'pjsua_msg_data_init'
../src/pjsua/pjsua_app_cli.c:1735: error: undefined reference to 'pjsip_generic_string_hdr_init2'
../src/pjsua/pjsua_app_cli.c:1748: error: undefined reference to 'pjsua_call_xfer'
../src/pjsua/pjsua_app_cli.c:1753: error: undefined reference to 'pjsua_call_xfer'
../src/pjsua/pjsua_app_cli.c:1778: error: undefined reference to 'pjsua_enum_calls'
../src/pjsua/pjsua_app_cli.c:1819: error: undefined reference to 'pjsua_call_is_active'
../src/pjsua/pjsua_app_cli.c:1828: error: undefined reference to 'pjsip_generic_string_hdr_init2'
../src/pjsua/pjsua_app_cli.c:1833: error: undefined reference to 'pjsua_call_xfer_replaces'
../src/pjsua/pjsua_app_cli.c:1846: error: undefined reference to 'pjsua_call_is_active'
../src/pjsua/pjsua_app_cli.c:1856: error: undefined reference to 'pjsua_call_process_redirect'
../src/pjsua/pjsua_app_cli.c:1860: error: undefined reference to 'pjsua_call_process_redirect'
../src/pjsua/pjsua_app_cli.c:1863: error: undefined reference to 'pjsua_call_process_redirect'
../src/pjsua/pjsua_app_cli.c:1866: error: undefined reference to 'pjsua_call_process_redirect'
../src/pjsua/pjsua_app_cli.c:1880: error: undefined reference to 'pjsua_call_has_media'
../src/pjsua/pjsua_app_cli.c:1895: error: undefined reference to 'pjsua_call_dial_dtmf'
../src/pjsua/pjsua_app_cli.c:1941: error: undefined reference to 'pjsua_call_send_request'
../src/pjsua/pjsua_app_cli.c:1965: error: undefined reference to 'pjsua_acc_get_count'
../src/pjsua/pjsua_app_cli.c:2023: error: undefined reference to 'pjsua_call_send_request'
../src/pjsua/pjsua_app_cli.c:2032: error: undefined reference to 'pjsua_call_get_count'
../src/pjsua/pjsua_app_cli.c:2141: error: undefined reference to 'pjsua_pool_create'
../src/pjsua/pjsua_app_cli.c:2153: error: undefined reference to 'pjsua_pool_create'
../src/pjsua/pjsua_app_cli.c:2190: error: undefined reference to 'pjsua_call_set_vid_strm'
../src/pjsua/pjsua_app_cli.c:2201: error: undefined reference to 'pjsua_call_vid_strm_op_param_default'
../src/pjsua/pjsua_app_cli.c:2204: error: undefined reference to 'pjsua_call_get_stream_info'
../src/pjsua/pjsua_app_cli.c:2214: error: undefined reference to 'pjsua_call_set_vid_strm'
../src/pjsua/pjsua_app_cli.c:2229: error: undefined reference to 'pjsua_call_vid_strm_op_param_default'
../src/pjsua/pjsua_app_cli.c:2233: error: undefined reference to 'pjsua_call_set_vid_strm'
../src/pjsua/pjsua_app_cli.c:2244: error: undefined reference to 'pjsua_call_vid_strm_op_param_default'
../src/pjsua/pjsua_app_cli.c:2248: error: undefined reference to 'pjsua_call_set_vid_strm'
../src/pjsua/pjsua_app_cli.c:2255: error: undefined reference to 'pjsua_call_vid_strm_op_param_default'
../src/pjsua/pjsua_app_cli.c:2273: error: undefined reference to 'pjmedia_vid_dev_refresh'
../src/pjsua/pjsua_app_cli.c:2285: error: undefined reference to 'pjsua_vid_preview_param_default'
../src/pjsua/pjsua_app_cli.c:2288: error: undefined reference to 'pjsua_vid_preview_start'
../src/pjsua/pjsua_app_cli.c:2289: error: undefined reference to 'pjsua_vid_preview_get_win'
../src/pjsua/pjsua_app_cli.c:2292: error: undefined reference to 'pjsua_vid_preview_get_win'
../src/pjsua/pjsua_app_cli.c:2296: error: undefined reference to 'pjsua_vid_win_set_show'
../src/pjsua/pjsua_app_cli.c:2297: error: undefined reference to 'pjsua_vid_preview_stop'
../src/pjsua/pjsua_app_cli.c:2307: error: undefined reference to 'pjsua_vid_enum_codecs'
../src/pjsua/pjsua_app_cli.c:2319: error: undefined reference to 'pjsua_vid_codec_get_param'
../src/pjsua/pjsua_app_cli.c:2323: error: undefined reference to 'pjmedia_format_get_video_format_detail'
../src/pjsua/pjsua_app_cli.c:2342: error: undefined reference to 'pjsua_vid_codec_set_priority'
../src/pjsua/pjsua_app_cli.c:2357: error: undefined reference to 'pjsua_vid_codec_get_param'
../src/pjsua/pjsua_app_cli.c:2361: error: undefined reference to 'pjsua_vid_codec_set_param'
../src/pjsua/pjsua_app_cli.c:2377: error: undefined reference to 'pjsua_vid_codec_get_param'
../src/pjsua/pjsua_app_cli.c:2381: error: undefined reference to 'pjsua_vid_codec_set_param'
../src/pjsua/pjsua_app_cli.c:2401: error: undefined reference to 'pjsua_vid_codec_set_param'
../src/pjsua/pjsua_app_cli.c:2414: error: undefined reference to 'pjsua_vid_enum_wins'
../src/pjsua/pjsua_app_cli.c:2421: error: undefined reference to 'pjsua_vid_win_get_info'
../src/pjsua/pjsua_app_cli.c:2438: error: undefined reference to 'pjsua_vid_win_set_show'
../src/pjsua/pjsua_app_cli.c:2448: error: undefined reference to 'pjsua_vid_win_set_pos'
../src/pjsua/pjsua_app_cli.c:2458: error: undefined reference to 'pjsua_vid_win_set_size'
../src/pjsua/pjsua_app_cli.c:2552: error: undefined reference to 'pj_strtoul'
../src/pjsua/pjsua_app_cli.c:2554: error: undefined reference to 'pj_thread_sleep'
../src/pjsua/pjsua_app_cli.c:2566: error: undefined reference to 'pjsua_detect_nat_type'
../src/pjsua/pjsua_app_cli.c:2576: error: undefined reference to 'pj_cli_quit'
../src/pjsua/pjsua_app_cli.c:2590: error: undefined reference to 'pj_throw_exception_'
../src/pjsua/pjsua_app_cli.c:2610: error: undefined reference to 'pj_scan_init'
../src/pjsua/pjsua_app_cli.c:2612: error: undefined reference to 'pj_push_exception_handler_'
../src/pjsua/pjsua_app_cli.c:2617: error: undefined reference to 'pj_scan_get_until_chr'
../src/pjsua/pjsua_app_cli.c:2623: error: undefined reference to 'pj_scan_fini'
../src/pjsua/pjsua_app_cli.c:2626: error: undefined reference to 'pj_pop_exception_handler_'
../src/pjsua/pjsua_app_cli.c:2640: error: undefined reference to 'pj_cli_quit'
../src/pjsua/pjsua_app_cli.c:2736: error: undefined reference to 'pj_cli_add_cmd_from_xml'
../src/pjsua/pjsua_app_cli.c:2792: error: undefined reference to 'pj_cli_add_cmd_from_xml'
../src/pjsua/pjsua_app_cli.c:2837: error: undefined reference to 'pj_cli_add_cmd_from_xml'
../src/pjsua/pjsua_app_cli.c:2872: error: undefined reference to 'pj_cli_add_cmd_from_xml'
../src/pjsua/pjsua_app_common.c:52: error: undefined reference to 'pj_strtoul'
../src/pjsua/pjsua_app_common.c:55: error: undefined reference to 'pj_strtoul'
../src/pjsua/pjsua_app_common.c:57: error: undefined reference to 'pj_strtoul'
../src/pjsua/pjsua_app_common.c:69: error: undefined reference to 'pjsua_call_get_max_count'
../src/pjsua/pjsua_app_common.c:71: error: undefined reference to 'pjsua_call_is_active'
../src/pjsua/pjsua_app_common.c:78: error: undefined reference to 'pjsua_call_is_active'
../src/pjsua/pjsua_app_common.c:92: error: undefined reference to 'pjsua_call_get_max_count'
../src/pjsua/pjsua_app_common.c:125: error: undefined reference to 'pjsip_method_init_np'
../src/pjsua/pjsua_app_common.c:127: error: undefined reference to 'pjsua_acc_create_request'
../src/pjsua/pjsua_app_common.c:129: error: undefined reference to 'pjsip_endpt_send_request'
../src/pjsua/pjsua_app_common.c:148: error: undefined reference to 'pjsua_call_dump'
../src/pjsua/pjsua_app_common.c:151: error: undefined reference to 'pj_log_get_decor'
../src/pjsua/pjsua_app_common.c:152: error: undefined reference to 'pj_log_set_decor'
../src/pjsua/pjsua_app_common.c:154: error: undefined reference to 'pj_log_set_decor'
../src/pjsua/pjsua_app_common.c:170: error: undefined reference to 'pj_log_set_decor'
../src/pjsua/pjsua_app_common.c:245: error: undefined reference to 'pjsua_vid_win_get_info'
../src/pjsua/pjsua_app_common.c:250: error: undefined reference to 'pjsua_vid_win_set_pos'
../src/pjsua/pjsua_app_common.c:257: error: undefined reference to 'pjsua_vid_win_set_pos'
../src/pjsua/pjsua_app_common.c:289: error: undefined reference to 'pjmedia_vid_dev_cap_name'
../src/pjsua/pjsua_app_common.c:301: error: undefined reference to 'pjmedia_get_video_format_info'
../src/pjsua/pjsua_app_common.c:323: error: undefined reference to 'pjsua_vid_dev_count'
../src/pjsua/pjsua_app_common.c:331: error: undefined reference to 'pjsua_vid_dev_get_info'
../src/pjsua/pjsua_app_common.c:336: error: undefined reference to 'pjsua_vid_dev_get_info'
../src/pjsua/pjsua_app_common.c:342: error: undefined reference to 'pjsua_vid_dev_get_info'
../src/pjsua/pjsua_app_config.c:219: error: undefined reference to 'pj_log_write'
../src/pjsua/pjsua_app_config.c:237: error: undefined reference to 'pj_pool_calloc'
../src/pjsua/pjsua_app_config.c:300: error: undefined reference to 'pj_pool_alloc'
../src/pjsua/pjsua_app_config.c:513: error: undefined reference to 'pj_getopt_long'
../src/pjsua/pjsua_app_config.c:562: error: undefined reference to 'pj_log_set_level'
../src/pjsua/pjsua_app_config.c:588: error: undefined reference to 'pj_log_set_color'
../src/pjsua/pjsua_app_config.c:589: error: undefined reference to 'pj_log_set_color'
../src/pjsua/pjsua_app_config.c:590: error: undefined reference to 'pj_log_set_color'
../src/pjsua/pjsua_app_config.c:591: error: undefined reference to 'pj_log_set_color'
../src/pjsua/pjsua_app_config.c:607: error: undefined reference to 'pj_dump_config'
../src/pjsua/pjsua_app_config.c:682: error: undefined reference to 'pjsua_verify_sip_url'
../src/pjsua/pjsua_app_config.c:692: error: undefined reference to 'pjsua_verify_sip_url'
../src/pjsua/pjsua_app_config.c:702: error: undefined reference to 'pjsua_verify_sip_url'
../src/pjsua/pjsua_app_config.c:776: error: undefined reference to 'pjsua_verify_url'
../src/pjsua/pjsua_app_config.c:786: error: undefined reference to 'pjsua_verify_sip_url'
../src/pjsua/pjsua_app_config.c:790: error: undefined reference to 'pj_optind'
../src/pjsua/pjsua_app_config.c:790: error: undefined reference to 'pj_optarg'
../src/pjsua/pjsua_app_config.c:790: error: undefined reference to 'pjsip_use_compact_form'
../src/pjsua/pjsua_app_config.c:790: error: undefined reference to 'pjsip_include_allow_hdr_in_dlg'
../src/pjsua/pjsua_app_config.c:790: error: undefined reference to 'pjmedia_add_rtpmap_for_static_pt'
../src/pjsua/pjsua_app_config.c:790: error: undefined reference to 'pj_optarg'
../src/pjsua/pjsua_app_config.c:899: error: undefined reference to 'pjsua_verify_url'
../src/pjsua/pjsua_app_config.c:1047: error: undefined reference to 'pj_rand'
../src/pjsua/pjsua_app_config.c:539: error: undefined reference to 'pj_getopt_long'
../src/pjsua/pjsua_app_config.c:1366: error: undefined reference to 'pj_stricmp'
../src/pjsua/pjsua_app_config.c:1425: error: undefined reference to 'pj_optarg'
../src/pjsua/pjsua_app_config.c:1425: error: undefined reference to 'pj_optind'
../src/pjsua/pjsua_app_config.c:1434: error: undefined reference to 'pjsua_config_default'
../src/pjsua/pjsua_app_config.c:1435: error: undefined reference to 'pj_get_version'
../src/pjsua/pjsua_app_config.c:1436: error: undefined reference to 'pj_get_sys_info'
../src/pjsua/pjsua_app_config.c:1437: error: undefined reference to 'pj_strdup2_with_null'
../src/pjsua/pjsua_app_config.c:1439: error: undefined reference to 'pjsua_logging_config_default'
../src/pjsua/pjsua_app_config.c:1440: error: undefined reference to 'pjsua_media_config_default'
../src/pjsua/pjsua_app_config.c:1441: error: undefined reference to 'pjsua_transport_config_default'
../src/pjsua/pjsua_app_config.c:1443: error: undefined reference to 'pjsua_transport_config_default'
../src/pjsua/pjsua_app_config.c:1460: error: undefined reference to 'pjsua_acc_config_default'
../src/pjsua/pjsua_app_config.c:1463: error: undefined reference to 'pjsua_buddy_config_default'
../src/pjsua/pjsua_app_config.c:1528: error: undefined reference to 'pj_strcat2'
../src/pjsua/pjsua_app_config.c:1536: error: undefined reference to 'pj_strcat2'
../src/pjsua/pjsua_app_config.c:1544: error: undefined reference to 'pj_strcat2'
../src/pjsua/pjsua_app_config.c:1548: error: undefined reference to 'pj_strcat2'
../src/pjsua/pjsua_app_config.c:2070: error: undefined reference to 'pjsip_use_compact_form'
/home/neosoft/PJSUA/pjproject-2.4.5/pjlib/include/pj/list.h:128: error: undefined reference to 'pj_list_insert_before'
../src/pjsua/pjsua_app_legacy.c:53: error: undefined reference to 'pjsua_enum_buddies'
../src/pjsua/pjsua_app_legacy.c:86: error: undefined reference to 'pjsua_get_buddy_count'
../src/pjsua/pjsua_app_legacy.c:86: error: undefined reference to 'pjsua_get_buddy_count'
../src/pjsua/pjsua_app_legacy.c:183: error: undefined reference to 'pjsua_acc_get_info'
../src/pjsua/pjsua_app_legacy.c:218: error: undefined reference to 'pjsua_enum_accs'
../src/pjsua/pjsua_app_legacy.c:375: error: undefined reference to 'pjsua_call_get_stream_info'
../src/pjsua/pjsua_app_legacy.c:430: error: undefined reference to 'pjmedia_vid_dev_refresh'
../src/pjsua/pjsua_app_legacy.c:440: error: undefined reference to 'pjsua_vid_preview_param_default'
../src/pjsua/pjsua_app_legacy.c:443: error: undefined reference to 'pjsua_vid_preview_start'
../src/pjsua/pjsua_app_legacy.c:444: error: undefined reference to 'pjsua_vid_preview_get_win'
../src/pjsua/pjsua_app_legacy.c:447: error: undefined reference to 'pjsua_vid_preview_get_win'
../src/pjsua/pjsua_app_legacy.c:451: error: undefined reference to 'pjsua_vid_win_set_show'
../src/pjsua/pjsua_app_legacy.c:452: error: undefined reference to 'pjsua_vid_preview_stop'
../src/pjsua/pjsua_app_legacy.c:465: error: undefined reference to 'pjsua_vid_enum_wins'
../src/pjsua/pjsua_app_legacy.c:482: error: undefined reference to 'pjsua_vid_win_set_show'
../src/pjsua/pjsua_app_legacy.c:489: error: undefined reference to 'pjsua_vid_win_set_pos'
../src/pjsua/pjsua_app_legacy.c:496: error: undefined reference to 'pjsua_vid_win_set_size'
../src/pjsua/pjsua_app_legacy.c:512: error: undefined reference to 'pjsua_vid_enum_codecs'
../src/pjsua/pjsua_app_legacy.c:528: error: undefined reference to 'pjmedia_format_get_video_format_detail'
../src/pjsua/pjsua_app_legacy.c:558: error: undefined reference to 'pjsua_vid_codec_set_param'
../src/pjsua/pjsua_app_legacy.c:625: error: undefined reference to 'pj_strncpy'
../src/pjsua/pjsua_app_legacy.c:636: error: undefined reference to 'pjsua_call_make_call'
../src/pjsua/pjsua_app_legacy.c:667: error: undefined reference to 'pj_strncpy'
../src/pjsua/pjsua_app_legacy.c:684: error: undefined reference to 'pjsua_detect_nat_type'
../src/pjsua/pjsua_app_legacy.c:724: error: undefined reference to 'pjsua_call_send_typing_ind'
../src/pjsua/pjsua_app_legacy.c:727: error: undefined reference to 'pjsua_im_typing'
../src/pjsua/pjsua_app_legacy.c:737: error: undefined reference to 'pjsua_call_send_typing_ind'
../src/pjsua/pjsua_app_legacy.c:740: error: undefined reference to 'pjsua_im_typing'
../src/pjsua/pjsua_app_legacy.c:749: error: undefined reference to 'pjsua_call_send_im'
../src/pjsua/pjsua_app_legacy.c:752: error: undefined reference to 'pjsua_im_send'
../src/pjsua/pjsua_app_legacy.c:815: error: undefined reference to 'pjsua_call_answer2'
../src/pjsua/pjsua_app_legacy.c:828: error: undefined reference to 'pjsua_call_hangup_all'
../src/pjsua/pjsua_app_legacy.c:866: error: undefined reference to 'pjsua_acc_is_valid'
../src/pjsua/pjsua_app_legacy.c:867: error: undefined reference to 'pjsua_acc_set_default'
../src/pjsua/pjsua_app_legacy.c:894: error: undefined reference to 'pjsua_buddy_add'
../src/pjsua/pjsua_app_legacy.c:918: error: undefined reference to 'pjsua_acc_config_default'
../src/pjsua/pjsua_app_legacy.c:931: error: undefined reference to 'pjsua_acc_add'
../src/pjsua/pjsua_app_legacy.c:947: error: undefined reference to 'pjsua_buddy_is_valid'
../src/pjsua/pjsua_app_legacy.c:950: error: undefined reference to 'pjsua_buddy_del'
../src/pjsua/pjsua_app_legacy.c:965: error: undefined reference to 'pjsua_acc_is_valid'
../src/pjsua/pjsua_app_legacy.c:968: error: undefined reference to 'pjsua_acc_del'
../src/pjsua/pjsua_app_legacy.c:976: error: undefined reference to 'pjsua_call_set_hold'
../src/pjsua/pjsua_app_legacy.c:985: error: undefined reference to 'pjsua_call_reinvite2'
../src/pjsua/pjsua_app_legacy.c:991: error: undefined reference to 'pjsua_call_update2'
../src/pjsua/pjsua_app_legacy.c:1011: error: undefined reference to 'pjsua_enum_codecs'
../src/pjsua/pjsua_app_legacy.c:1020: error: undefined reference to 'pjsua_vid_enum_codecs'
../src/pjsua/pjsua_app_legacy.c:1058: error: undefined reference to 'pjsua_codec_set_priority'
../src/pjsua/pjsua_app_legacy.c:1110: error: undefined reference to 'pjsua_call_xfer'
../src/pjsua/pjsua_app_legacy.c:1116: error: undefined reference to 'pjsua_call_xfer'
../src/pjsua/pjsua_app_legacy.c:1138: error: undefined reference to 'pjsua_enum_calls'
../src/pjsua/pjsua_app_legacy.c:1200: error: undefined reference to 'pjsua_call_xfer_replaces'
../src/pjsua/pjsua_app_legacy.c:1210: error: undefined reference to 'pjsua_call_has_media'
../src/pjsua/pjsua_app_legacy.c:1230: error: undefined reference to 'pjsua_call_dial_dtmf'
../src/pjsua/pjsua_app_legacy.c:1276: error: undefined reference to 'pjsua_call_send_request'
../src/pjsua/pjsua_app_legacy.c:1293: error: undefined reference to 'pjsua_acc_get_count'
../src/pjsua/pjsua_app_legacy.c:1342: error: undefined reference to 'pjsua_call_send_request'
../src/pjsua/pjsua_app_legacy.c:1378: error: undefined reference to 'pj_thread_sleep'
../src/pjsua/pjsua_app_legacy.c:1393: error: undefined reference to 'pjsua_buddy_subscribe_pres'
../src/pjsua/pjsua_app_legacy.c:1398: error: undefined reference to 'pjsua_buddy_subscribe_pres'
../src/pjsua/pjsua_app_legacy.c:1414: error: undefined reference to 'pjsua_acc_set_registration'
../src/pjsua/pjsua_app_legacy.c:1420: error: undefined reference to 'pjsua_acc_set_registration'
../src/pjsua/pjsua_app_legacy.c:1513: error: undefined reference to 'pjsua_acc_set_online_status2'
../src/pjsua/pjsua_app_legacy.c:1527: error: undefined reference to 'pjsua_enum_conf_ports'
../src/pjsua/pjsua_app_legacy.c:1534: error: undefined reference to 'pjsua_conf_get_port_info'
../src/pjsua/pjsua_app_legacy.c:1581: error: undefined reference to 'pjsua_conf_disconnect'
../src/pjsua/pjsua_app_legacy.c:1598: error: undefined reference to 'pjsua_conf_adjust_rx_level'
../src/pjsua/pjsua_app_legacy.c:1604: error: undefined reference to 'pjsua_conf_adjust_tx_level'
../src/pjsua/pjsua_app_legacy.c:1642: error: undefined reference to 'pj_file_open'
../src/pjsua/pjsua_app_legacy.c:1647: error: undefined reference to 'pj_file_write'
../src/pjsua/pjsua_app_legacy.c:1648: error: undefined reference to 'pj_file_close'
../src/pjsua/pjsua_app_legacy.c:1660: error: undefined reference to 'pjsua_dump'
../src/pjsua/pjsua_app_legacy.c:1730: error: undefined reference to 'pjsua_call_setting_default'
collect2: error: ld returned 1 exit status
make[1]: *** [../bin/pjsua-arm-unknown-linux-androideabi] Error 1
make[1]: Leaving directory `/home/neosoft/PJSUA/pjproject-2.4.5/pjsip-apps/build'
make: *** [pjsua-arm-unknown-linux-androideabi] Error 2
Stuck for a while on this issue. Any suggestions on this?
Android ndk-path should be available in the ANDROID_NDK_ROOT environment variable.
Configure and compile pjsip with the desired TARGET_ANDROID_API, arch and buildtype:
$ NDK_TOOLCHAIN_VERSION=clang APP_PLATFORM=android-${TARGET_ANDROID_API} TARGET_ABI=$arch BUILD_TYPE=${buildtype} ./configure-android --use-ndk-cflags
$ make dep
$ make
Compile pjsua:
$ cd pjsip-apps/src/swig
$ make
libpjsua2.so will be created in pjsip-apps/src/swig/java/android/libs/armeabi directory.
I'm trying to compile and deploy ceres solver into an Android project.
I successfully compiled ceres (1.8.0 and 1.9.0, tried both), running ndk-build from the ceres jni folder.
Then, I use QtCreator to compile and deploy and Android project. It fails with the following error:
B:\Android\android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++ --sysroot=B:\Android\android-ndk-r10e/platforms/android-9/arch-arm/ -Wl,-soname,libtest_3rdparty_inprg_ceres.so -Wl,--no-undefined -Wl,-z,noexecstack -shared -o libtest_3rdparty_inprg_ceres.so main.obj logging.obj -LB:\Android\android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a -LB:\Android\android-ndk-r10e/platforms/android-9/arch-arm//usr/lib -lb:/dev/vobs_ext/libcpp/ceres/ceres-solver-1.9.0/lib/android_armeabi-v7a/gcc-4.8/libceres.a -LC:/Qt/5.5/android_armv7/lib -lQt5Widgets -Lc:\utils\android\ndk/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a -Lc:\utils\android\ndk/platforms/android-9/arch-arm//usr/lib -lQt5Gui -lQt5Core -lGLESv2 -lgnustl_shared -llog -lz -lm -ldl -lc -lgcc
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/memory:3639: error: undefined reference to 'std::__1::__shared_weak_count::~__shared_weak_count()'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/memory:4448: error: undefined reference to 'std::__1::__shared_weak_count::__release_shared()'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ios:524: error: undefined reference to 'std::__1::ios_base::clear(unsigned int)'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/memory:4154: error: undefined reference to 'std::__1::__shared_weak_count::__add_shared()'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/memory:4154: error: undefined reference to 'std::__1::__shared_weak_count::__add_shared()'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ios:734: error: undefined reference to 'std::__1::ios_base::getloc() const'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/__locale:174: error: undefined reference to 'std::__1::locale::use_facet(std::__1::locale::id&) const'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ios:734: error: undefined reference to 'std::__1::locale::~locale()'
B:/dev/vobs_ext/libcpp/ceres/ceres-solver-1.9.0/jni/../internal/ceres/solver_impl.cc:123: error: undefined reference to 'std::__1::cout'
B:/dev/vobs_ext/libcpp/ceres/ceres-solver-1.9.0/jni/../internal/ceres/solver_impl.cc:123: error: undefined reference to 'std::__1::ctype<char>::id'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ios:734: error: undefined reference to 'std::__1::ios_base::getloc() const'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/__locale:174: error: undefined reference to 'std::__1::locale::use_facet(std::__1::locale::id&) const'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ios:734: error: undefined reference to 'std::__1::locale::~locale()'
B:/dev/vobs_ext/libcpp/ceres/ceres-solver-1.9.0/jni/../internal/ceres/solver_impl.cc:158: error: undefined reference to 'std::__1::cout'
B:/dev/vobs_ext/libcpp/ceres/ceres-solver-1.9.0/jni/../internal/ceres/solver_impl.cc:158: error: undefined reference to 'std::__1::ctype<char>::id'
b:/dev/vobs_ext/libcpp/ceres/ceres-solver-1.9.0/lib/android_armeabi-v7a/gcc-4.8/libceres.a(solver_impl.o):solver_impl.cc:vtable for std::__1::__shared_ptr_pointer<ceres::OrderedGroups<double*>*, std::__1::default_delete<ceres::OrderedGroups<double*> >, std::__1::allocator<ceres::OrderedGroups<double*> > >: error: undefined reference to 'std::__1::__shared_weak_count::__get_deleter(std::type_info const&) const'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ostream:508: error: undefined reference to 'std::__1::ios_base::getloc() const'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/__locale:174: error: undefined reference to 'std::__1::locale::use_facet(std::__1::locale::id&) const'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ostream:508: error: undefined reference to 'std::__1::locale::~locale()'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ios:734: error: undefined reference to 'std::__1::ios_base::getloc() const'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/__locale:174: error: undefined reference to 'std::__1::locale::use_facet(std::__1::locale::id&) const'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ios:734: error: undefined reference to 'std::__1::locale::~locale()'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ios:524: error: undefined reference to 'std::__1::ios_base::clear(unsigned int)'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ostream:520: error: undefined reference to 'std::__1::num_put<char, std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> > >::id'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ostream:520: error: undefined reference to 'std::__1::ctype<char>::id'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ios:668: error: undefined reference to 'std::__1::ios_base::init(void*)'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/streambuf:370: error: undefined reference to 'std::__1::locale::locale()'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/__hash_table:1944: error: undefined reference to 'std::__1::__next_prime(unsigned int)'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/__hash_table:1955: error: undefined reference to 'std::__1::__next_prime(unsigned int)'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/__hash_table:1944: error: undefined reference to 'std::__1::__next_prime(unsigned int)'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/__hash_table:1955: error: undefined reference to 'std::__1::__next_prime(unsigned int)'
b:/dev/vobs_ext/libcpp/ceres/ceres-solver-1.9.0/lib/android_armeabi-v7a/gcc-4.8/libceres.a(schur_eliminator.o):schur_eliminator.cc:vtable for ceres::internal::SchurEliminator<2, 4, 8>: error: undefined reference to 'ceres::internal::SchurEliminator<2, 4, 8>::~SchurEliminator()'
b:/dev/vobs_ext/libcpp/ceres/ceres-solver-1.9.0/lib/android_armeabi-v7a/gcc-4.8/libceres.a(schur_eliminator.o):schur_eliminator.cc:vtable for ceres::internal::SchurEliminator<2, 4, 8>: error: undefined reference to 'ceres::internal::SchurEliminator<2, 4, 8>::~SchurEliminator()'
b:/dev/vobs_ext/libcpp/ceres/ceres-solver-1.9.0/lib/android_armeabi-v7a/gcc-4.8/libceres.a(schur_eliminator.o):schur_eliminator.cc:vtable for ceres::internal::SchurEliminator<2, 4, 8>: error: undefined reference to 'ceres::internal::SchurEliminator<2, 4, 8>::Init(int, ceres::internal::CompressedRowBlockStructure const*)'
b:/dev/vobs_ext/libcpp/ceres/ceres-solver-1.9.0/lib/android_armeabi-v7a/gcc-4.8/libceres.a(schur_eliminator.o):schur_eliminator.cc:vtable for ceres::internal::SchurEliminator<2, 4, 8>: error: undefined reference to 'ceres::internal::SchurEliminator<2, 4, 8>::Eliminate(ceres::internal::BlockSparseMatrix const*, double const*, double const*, ceres::internal::BlockRandomAccessMatrix*, double*)'
b:/dev/vobs_ext/libcpp/ceres/ceres-solver-1.9.0/lib/android_armeabi-v7a/gcc-4.8/libceres.a(schur_eliminator.o):schur_eliminator.cc:vtable for ceres::internal::SchurEliminator<2, 4, 8>: error: undefined reference to 'ceres::internal::SchurEliminator<2, 4, 8>::BackSubstitute(ceres::internal::BlockSparseMatrix const*, double const*, double const*, double const*, double*)'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/algorithm:3077: error: undefined reference to 'std::__1::__rs_get()'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/algorithm:2912: error: undefined reference to 'std::__1::__rs_default::operator()()'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/algorithm:2912: error: undefined reference to 'std::__1::__rs_default::operator()()'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/algorithm:3083: error: undefined reference to 'std::__1::__rs_default::~__rs_default()'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/algorithm:3077: error: undefined reference to 'std::__1::__rs_get()'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/algorithm:2912: error: undefined reference to 'std::__1::__rs_default::operator()()'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/algorithm:2912: error: undefined reference to 'std::__1::__rs_default::operator()()'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/algorithm:3083: error: undefined reference to 'std::__1::__rs_default::~__rs_default()'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/algorithm:3077: error: undefined reference to 'std::__1::__rs_get()'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/algorithm:3083: error: undefined reference to 'std::__1::__rs_default::~__rs_default()'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/algorithm:3077: error: undefined reference to 'std::__1::__rs_get()'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/algorithm:3083: error: undefined reference to 'std::__1::__rs_default::~__rs_default()'
B:/dev/vobs_ext/libcpp/ceres/ceres-solver-1.9.0/jni/../internal/ceres/partitioned_matrix_view.cc:118: error: undefined reference to 'ceres::internal::PartitionedMatrixView<2, 4, 8>::PartitionedMatrixView(ceres::internal::BlockSparseMatrix const&, int)'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ios:661: error: undefined reference to 'std::__1::ios_base::~ios_base()'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ios:524: error: undefined reference to 'std::__1::ios_base::clear(unsigned int)'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/streambuf:370: error: undefined reference to 'std::__1::locale::locale()'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ios:524: error: undefined reference to 'std::__1::ios_base::clear(unsigned int)'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ostream:494: error: undefined reference to 'std::__1::num_put<char, std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> > >::id'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ostream:494: error: undefined reference to 'std::__1::ctype<char>::id'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ostream:728: error: undefined reference to 'std::__1::num_put<char, std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> > >::id'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ostream:676: error: undefined reference to 'std::__1::num_put<char, std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> > >::id'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ios:668: error: undefined reference to 'std::__1::ios_base::init(void*)'
B:/Android/android-ndk-r10e/sources/cxx-stl/llvm-libc++/libcxx/include/ios:668: error: undefined reference to 'std::__1::ios_base::init(void*)'
collect2.exe: error: ld returned 1 exit status
makefile:82: recipe for target 'libtest_3rdparty_inprg_ceres.so' failed
mingw32-make: *** [libtest_3rdparty_inprg_ceres.so] Error 1
13:17:13: Le processus "C:\Qt\Tools\mingw492_32\bin\mingw32-make.exe" s'est terminé avec le code 2.
Erreur lors de la compilation/déploiement du projet test_3rdparty_inprg_ceres (kit : Android for armeabi-v7a (GCC 4.9, Qt 5.5.0))
When executing step "Make"
13:17:13: Temps écoulé : 00:08.
I'm wondering if this could be due to ceres linking with c++ libraries statically, while my program links then dynamically....but have no clue how to solve this.
All libraries in your app SHOULD use the same STL runtime. But speaking about static libraries, they MUST use the same STL configuration. If you did not change cerces-solver/jni/Application.mk, it will expect APP_STL=c++_static. You can override this to use APP_STL=c++_shared, but you need a very good reason to change the way this external library is built. Much easier to switch your program to APP_STL=c++_static.
Edited by jpo38:
There are actually other things to be changed to have libceres.so be generated instead of libceres.a:
Add LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -llog in Android.mk
Replace include $(BUILD_STATIC_LIBRARY) by include $(BUILD_SHARED_LIBRARY) in Android.mk
Add -DCERES_BUILDING_SHARED_LIBRARY and -DCERES_RESTRICT_SCHUR_SPECIALIZATION (dunno why this second one helps, looks like Shur stuff does not like shared linkage) to LOCAL_CFLAGS in Android.mk
Then, the dynamic library is generated and may be used.
I have successfully build CSipSimple for android by make command. After that, when I try to build video support libary by calling make VideoLibs command, there is an error appears.
[armeabi] SharedLibrary : libpj_video_android.so
[armeabi-v7a] SharedLibrary : libpj_video_android.so
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1086: error: undefined reference to 'av_strerror'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1324: error: undefined reference to 'avcodec_close'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1325: error: undefined reference to 'av_free'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1328: error: undefined reference to 'avcodec_close'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1329: error: undefined reference to 'av_free'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1430: error: undefined reference to 'avcodec_get_frame_defaults'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1455: error: undefined reference to 'av_init_packet'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1460: error: undefined reference to 'avcodec_encode_video2'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:409: error: undefined reference to 'av_opt_set'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:427: error: undefined reference to 'av_opt_set_int'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:434: error: undefined reference to 'av_opt_set_int'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:442: error: undefined reference to 'av_opt_set'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:445: error: undefined reference to 'av_opt_set'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1116: error: undefined reference to 'avcodec_alloc_context3'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1125: error: undefined reference to 'avcodec_alloc_context3'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1185: error: undefined reference to 'avcodec_open2'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1200: error: undefined reference to 'avcodec_open2'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1222: error: undefined reference to 'avcodec_close'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1223: error: undefined reference to 'av_free'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1228: error: undefined reference to 'avcodec_close'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1229: error: undefined reference to 'av_free'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1680: error: undefined reference to 'avcodec_get_frame_defaults'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1683: error: undefined reference to 'av_init_packet'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1705: error: undefined reference to 'avcodec_decode_video2'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:629: error: undefined reference to 'avcodec_register_all'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:632: error: undefined reference to 'av_codec_next'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/converter_libswscale.c:172: error: undefined reference to 'sws_freeContext'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/converter_libswscale.c:152: error: undefined reference to 'sws_scale'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/converter_libswscale.c:112: error: undefined reference to 'sws_getContext'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/ffmpeg_util.c:113: error: undefined reference to 'av_log_get_level'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/ffmpeg_util.c:88: error: undefined reference to 'av_log_set_level'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/ffmpeg_util.c:89: error: undefined reference to 'av_log_set_callback'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/ffmpeg_util.c:90: error: undefined reference to 'av_register_all'
collect2: error: ld returned 1 exit status
make[1]: *** [obj/local/armeabi/libpj_video_android.so] Error 1
make[1]: *** Waiting for unfinished jobs....
[armeabi-v7a] Install : libpjsipjni.so => ./libs/armeabi-v7a/libpjsipjni.so
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1086: error: undefined reference to 'av_strerror'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1324: error: undefined reference to 'avcodec_close'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1325: error: undefined reference to 'av_free'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1328: error: undefined reference to 'avcodec_close'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1329: error: undefined reference to 'av_free'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1430: error: undefined reference to 'avcodec_get_frame_defaults'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1455: error: undefined reference to 'av_init_packet'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1460: error: undefined reference to 'avcodec_encode_video2'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:409: error: undefined reference to 'av_opt_set'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:427: error: undefined reference to 'av_opt_set_int'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:434: error: undefined reference to 'av_opt_set_int'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:442: error: undefined reference to 'av_opt_set'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:445: error: undefined reference to 'av_opt_set'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1116: error: undefined reference to 'avcodec_alloc_context3'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1125: error: undefined reference to 'avcodec_alloc_context3'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1185: error: undefined reference to 'avcodec_open2'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1200: error: undefined reference to 'avcodec_open2'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1222: error: undefined reference to 'avcodec_close'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1223: error: undefined reference to 'av_free'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1228: error: undefined reference to 'avcodec_close'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1229: error: undefined reference to 'av_free'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1680: error: undefined reference to 'avcodec_get_frame_defaults'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1683: error: undefined reference to 'av_init_packet'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:1705: error: undefined reference to 'avcodec_decode_video2'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:629: error: undefined reference to 'avcodec_register_all'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:632: error: undefined reference to 'av_codec_next'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c:632: error: undefined reference to 'av_codec_next'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/converter_libswscale.c:172: error: undefined reference to 'sws_freeContext'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/converter_libswscale.c:152: error: undefined reference to 'sws_scale'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/converter_libswscale.c:112: error: undefined reference to 'sws_getContext'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/ffmpeg_util.c:113: error: undefined reference to 'av_log_get_level'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/ffmpeg_util.c:88: error: undefined reference to 'av_log_set_level'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/ffmpeg_util.c:89: error: undefined reference to 'av_log_set_callback'
jni/pjsip/android_toolchain/pjmedia/../../sources/pjmedia/src/pjmedia/ffmpeg_util.c:90: error: undefined reference to 'av_register_all'
collect2: error: ld returned 1 exit status
make[1]: *** [obj/local/armeabi-v7a/libpj_video_android.so] Error 1
make[1]: Leaving directory `/home/alexchengalan/android/files/CSipSimple-trunk/CSipSimple'
make: *** [VideoLibs] Error 2
It would be great if anyone can help me out of this problem.
Modify jni\pjsip\android_toolchain\pjmedia\Video.mk; then, it would be ok.
# Ffmpeg codec
BASE_FFMPEG_BUILD_DIR := $(LOCAL_PATH)/../../../ffmpeg/build/ffmpeg/$(TARGET_ARCH_ABI)/lib
LOCAL_LDLIBS += $(BASE_FFMPEG_BUILD_DIR)/libavcodec.a \
$(BASE_FFMPEG_BUILD_DIR)/libavformat.a \
$(BASE_FFMPEG_BUILD_DIR)/libswscale.a \
$(BASE_FFMPEG_BUILD_DIR)/libavutil.a
# Add X264
BASE_X264_BUILD_DIR := $(LOCAL_PATH)/../../../ffmpeg/build/x264/$(TARGET_ARCH_ABI)/lib
LOCAL_LDLIBS += $(BASE_X264_BUILD_DIR)/libx264.a
For details, see: (https://groups.google.com/forum/#!topic/csipsimple-dev/bSauDx-hnR0)
When I am compiling irrlicht project it showing me so many undefined reference error. I guess its looking for egl.h which comes with android ndk package.
Here is error logs :
[armeabi] SharedLibrary : libirrlichttest.so
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CIrrDeviceAndroid.o): in function irr::CIrrDeviceAndroid::handleInput(android_app*, AInputEvent*):jni/Android/CIrrDeviceAndroid.cpp:274: error: undefined reference to 'AInputEvent_getType'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CIrrDeviceAndroid.o): in function irr::CIrrDeviceAndroid::handleInput(android_app*, AInputEvent*):jni/Android/CIrrDeviceAndroid.cpp:277: error: undefined reference to 'AMotionEvent_getPointerCount'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CIrrDeviceAndroid.o): in function irr::CIrrDeviceAndroid::handleInput(android_app*, AInputEvent*):jni/Android/CIrrDeviceAndroid.cpp:278: error: undefined reference to 'AMotionEvent_getAction'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CIrrDeviceAndroid.o): in function irr::CIrrDeviceAndroid::handleInput(android_app*, AInputEvent*):jni/Android/CIrrDeviceAndroid.cpp:313: error: undefined reference to 'AMotionEvent_getX'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CIrrDeviceAndroid.o): in function irr::CIrrDeviceAndroid::handleInput(android_app*, AInputEvent*):jni/Android/CIrrDeviceAndroid.cpp:314: error: undefined reference to 'AMotionEvent_getY'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CIrrDeviceAndroid.o): in function irr::CIrrDeviceAndroid::closeDevice():jni/Android/CIrrDeviceAndroid.cpp:171: error: undefined reference to 'ANativeActivity_finish'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CIrrDeviceAndroid.o): in function irr::CIrrDeviceAndroid::run():jni/Android/CIrrDeviceAndroid.cpp:110: error: undefined reference to 'ALooper_pollAll'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CIrrDeviceAndroid.o): in function irr::CIrrDeviceAndroid::CIrrDeviceAndroid(irr::SIrrlichtCreationParameters const&):jni/Android/CIrrDeviceAndroid.cpp:55: error: undefined reference to 'ASensorManager_getInstance'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CIrrDeviceAndroid.o): in function irr::CIrrDeviceAndroid::CIrrDeviceAndroid(irr::SIrrlichtCreationParameters const&):jni/Android/CIrrDeviceAndroid.cpp:56: error: undefined reference to 'ASensorManager_createEventQueue'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CIrrDeviceAndroid.o): in function irr::CIrrDeviceAndroid::CIrrDeviceAndroid(irr::SIrrlichtCreationParameters const&):jni/Android/CIrrDeviceAndroid.cpp:69: error: undefined reference to 'ALooper_pollAll'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CIrrDeviceAndroid.o): in function irr::CIrrDeviceAndroid::CIrrDeviceAndroid(irr::SIrrlichtCreationParameters const&):jni/Android/CIrrDeviceAndroid.cpp:55: error: undefined reference to 'ASensorManager_getInstance'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CIrrDeviceAndroid.o): in function irr::CIrrDeviceAndroid::CIrrDeviceAndroid(irr::SIrrlichtCreationParameters const&):jni/Android/CIrrDeviceAndroid.cpp:56: error: undefined reference to 'ASensorManager_createEventQueue'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CIrrDeviceAndroid.o): in function irr::CIrrDeviceAndroid::CIrrDeviceAndroid(irr::SIrrlichtCreationParameters const&):jni/Android/CIrrDeviceAndroid.cpp:69: error: undefined reference to 'ALooper_pollAll'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CIrrDeviceAndroid.o): in function irr::CIrrDeviceAndroid::handleAndroidCommand(android_app*, int):jni/Android/CIrrDeviceAndroid.cpp:215: error: undefined reference to 'ANativeWindow_getWidth'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CIrrDeviceAndroid.o): in function irr::CIrrDeviceAndroid::handleAndroidCommand(android_app*, int):jni/Android/CIrrDeviceAndroid.cpp:216: error: undefined reference to 'ANativeWindow_getHeight'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CAndroidAssetReader.o): in function .LTHUNK10:jni/Android/CAndroidAssetReader.cpp:57: error: undefined reference to 'AAsset_getLength'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CAndroidAssetReader.o): in function .LTHUNK11:jni/Android/CAndroidAssetReader.cpp:62: error: undefined reference to 'AAsset_getLength'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CAndroidAssetReader.o): in function .LTHUNK11:jni/Android/CAndroidAssetReader.cpp:62: error: undefined reference to 'AAsset_getRemainingLength'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CAndroidAssetReader.o): in function .LTHUNK9:jni/Android/CAndroidAssetReader.cpp:50: error: undefined reference to 'AAsset_seek'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CAndroidAssetReader.o): in function .LTHUNK8:jni/Android/CAndroidAssetReader.cpp:45: error: undefined reference to 'AAsset_read'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CAndroidAssetReader.o): in function .LTHUNK5:jni/Android/CAndroidAssetReader.cpp:40: error: undefined reference to 'AAsset_close'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CAndroidAssetReader.o): in function irr::io::CAndroidAssetReader::~CAndroidAssetReader():jni/Android/CAndroidAssetReader.cpp:40: error: undefined reference to 'AAsset_close'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CAndroidAssetReader.o): in function irr::io::CAndroidAssetReader::CAndroidAssetReader(irr::core::string<char, irr::core::irrAllocator<char> > const&):jni/Android/CAndroidAssetReader.cpp:32: error: undefined reference to 'AAssetManager_open'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CAndroidAssetReader.o): in function irr::io::CAndroidAssetReader::CAndroidAssetReader(irr::core::string<char, irr::core::irrAllocator<char> > const&):jni/Android/CAndroidAssetReader.cpp:32: error: undefined reference to 'AAssetManager_open'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CAndroidAssetFileArchive.o): in function irr::io::CAndroidAssetFileArchive::addDirectory(irr::core::string<char, irr::core::irrAllocator<char> > const&):jni/Android/CAndroidAssetFileArchive.cpp:87: error: undefined reference to 'AAssetManager_openDir'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CAndroidAssetFileArchive.o): in function irr::io::CAndroidAssetFileArchive::addDirectory(irr::core::string<char, irr::core::irrAllocator<char> > const&):jni/Android/CAndroidAssetFileArchive.cpp:92: error: undefined reference to 'AAssetDir_getNextFileName'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::swapBuffers():jni/CEGLManager.cpp:348: error: undefined reference to 'eglSwapBuffers'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::destroyContext():jni/CEGLManager.cpp:323: error: undefined reference to 'eglMakeCurrent'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::destroyContext():jni/CEGLManager.cpp:324: error: undefined reference to 'eglDestroyContext'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::destroySurface():jni/CEGLManager.cpp:271: error: undefined reference to 'eglMakeCurrent'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::destroySurface():jni/CEGLManager.cpp:273: error: undefined reference to 'eglDestroySurface'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::terminate():jni/CEGLManager.cpp:85: error: undefined reference to 'eglMakeCurrent'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::terminate():jni/CEGLManager.cpp:87: error: undefined reference to 'eglTerminate'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::generateSurface():jni/CEGLManager.cpp:157: error: undefined reference to 'eglChooseConfig'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::generateSurface():jni/CEGLManager.cpp:240: error: undefined reference to 'eglGetConfigAttrib'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::generateSurface():jni/CEGLManager.cpp:242: error: undefined reference to 'ANativeWindow_setBuffersGeometry'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::generateSurface():jni/CEGLManager.cpp:246: error: undefined reference to 'eglCreateWindowSurface'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::generateSurface():jni/CEGLManager.cpp:249: error: undefined reference to 'eglCreateWindowSurface'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::generateSurface():jni/CEGLManager.cpp:256: error: undefined reference to 'eglBindAPI'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::generateSurface():jni/CEGLManager.cpp:260: error: undefined reference to 'eglSwapInterval'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::testEGLError():jni/CEGLManager.cpp:354: error: undefined reference to 'eglGetError'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::activateContext(irr::video::SExposedVideoData const&):jni/CEGLManager.cpp:331: error: undefined reference to 'eglMakeCurrent'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::generateContext():jni/CEGLManager.cpp:307: error: undefined reference to 'eglCreateContext'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::initialize(irr::SIrrlichtCreationParameters const&, irr::video::SExposedVideoData const&):jni/CEGLManager.cpp:51: error: undefined reference to 'eglGetDisplay'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(CEGLManager.o): in function irr::video::CEGLManager::initialize(irr::SIrrlichtCreationParameters const&, irr::video::SExposedVideoData const&):jni/CEGLManager.cpp:63: error: undefined reference to 'eglInitialize'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(COGLES2Driver.o): in function irr::video::COGLES2Driver::testEGLError():jni/COGLES2Driver.cpp:1633: error: undefined reference to 'eglGetError'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(COGLESExtensionHandler.o): in function irr::video::COGLES1ExtensionHandler::initExtensions(irr::video::COGLES1Driver*, bool):jni/COGLESExtensionHandler.cpp:246: error: undefined reference to 'eglGetProcAddress'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(COGLESExtensionHandler.o): in function irr::video::COGLES1ExtensionHandler::initExtensions(irr::video::COGLES1Driver*, bool):jni/COGLESExtensionHandler.cpp:247: error: undefined reference to 'eglGetProcAddress'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(COGLESExtensionHandler.o): in function irr::video::COGLES1ExtensionHandler::initExtensions(irr::video::COGLES1Driver*, bool):jni/COGLESExtensionHandler.cpp:248: error: undefined reference to 'eglGetProcAddress'
D:/Work/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libirrlicht.a(COGLESExtensionHandler.o): in function irr::video::COGLES1ExtensionHandler::initExtensions(irr::video::COGLES1Driver*, bool):jni/COGLESExtensionHandler.cpp:249: error: undefined reference to 'eglGetProcAddress'
collect2: ld returned 1 exit status
make.exe: *** [obj/local/armeabi/libirrlichttest.so] Error 1
**** Build Finished ****
And here is my android.mk(Removing some of cpp files just to take screenshot )
And here is my application.mk
APP_ABI := armeabi armeabi-v7a
APP_PLATFORM := android-10
APP_MODULE := irrlicht
What am I doing wrong ?
You don't need to explicitly add NDK include directory to your CFLAGS. If the project fails to compile without it, your configuration is wrong.
Your Android.mk misses
LOCAL_LDLIBS := -llog -landroid -lEGL
and probably some more ndk libs