cocos2dx 3.17 andoird studio 使用到curl ,打包出錯

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)

 

引用地址:

https://forum.cocos.org/t/3-17-1-android-studio-curl-d-x-external-curl-prebuilt-android-x86-libcurl-a-libcurl-la-openssl-o-vtls-openssl-c-function-ossl-connect-common-error-undefined-reference-to-pkcs12-parse/73112/4

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章