cocos2dx 3.17 使用到curl ,andoird studio打包鏈接出錯
libcurl.a(libcurl_la-openssl.o):vtls/openssl.c:function ossl_connect_common: error: undefined reference to 'PKCS12_parse
解決方法:
根目錄的主CMakeLists.txt中添加curl靜態庫鏈接
add_library(curl STATIC IMPORTED GLOBAL)
set_target_properties(curl
PROPERTIES IMPORTED_LOCATION "${COCOS2DX_ROOT_PATH}/external/curl/prebuilt/android/${ANDROID_ABI}/libcurl.a"
)
target_link_libraries(${APP_NAME} curl)
引用地址: