当前位置: 代码迷 >> 综合 >> cocos2dx 3.17 andoird studio 使用到curl ,打包出错
  详细解决方案

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

热度:41   发布时间:2024-01-14 10:47:52.0

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

  相关解决方案