AndroidStudioNDK:useprebuiltopenslllibraries-errorfindingincludefiles
创始人
2024-10-11 14:32:43
0

可以尝试在工程的CMakeLists.txt文件中手动添加OpenSSL库的include路径,以解决找不到include文件的问题。具体步骤如下:

  1. 在build.gradle文件中添加OpenSSL库的依赖:
dependencies {
    implementation 'org.conscrypt:conscrypt-android:2.5.1'
}
  1. 在CMakeLists.txt文件中添加以下代码进行OpenSSL库的引用和include路径的设置:
find_library( # Defines the name of the path variable that stores the
              # location of the NDK library.
              ssl-lib

              # Specifies the name of the NDK library that
              # you want CMake to locate.
              ssl)

find_library( # Defines the name of the path variable that stores the
              # location of the NDK library.
              crypto-lib

              # Specifies the name of the NDK library that
              # you want CMake to locate.
              crypto)

# 引用OpenSSL库
target_link_libraries(your-project ssl-lib crypto-lib)

# 设置include路径
target_include_directories(your-project PRIVATE path-to-openssl-include-dir)

其中,path-to-openssl-include-dir为OpenSSL库中include文件所在的路径。

通过以上步骤,即可成功引用OpenSSL库并设置include路径,解决编译时找不到include文件的问题。

相关内容

热门资讯

透视技法!wepoker有机器... 透视技法!wepoker有机器人吗(WPK俱乐部)本来有辅助攻略(哔哩哔哩)1、不需要AI权限,帮助...
透视模块!wepoker私人局... 透视模块!wepoker私人局透视方法(AApoker安全)其实真的有辅助脚本(哔哩哔哩)一、wep...
透视讲义!wepoker透视最... 透视讲义!wepoker透视最简单三个步骤(WePoKer内购)一直真的有辅助脚本(哔哩哔哩)1、超...
透视经验!hhpoker为什么... 透视经验!hhpoker为什么一直输(WePoKer用挂)总是真的有辅助神器(哔哩哔哩)1、hhpo...
透视资料!拱趴大菠萝万能辅助器... 透视资料!拱趴大菠萝万能辅助器(透视)约局吧能不能开挂(辅助)竟然存在有app(哔哩哔哩)1、玩家可...
透视窍门!pokemmo脚本辅... 透视窍门!pokemmo脚本辅助器下载(透视)epoker底牌透视(辅助)总是一直都是有攻略(哔哩哔...
透视举措!wepoker安装教... 透视举措!wepoker安装教程(WePoKer好牌)真是存在有辅助软件(哔哩哔哩)1、在wepok...
透视教程书!菠萝德普辅助器免费... 透视教程书!菠萝德普辅助器免费版在哪里(透视)来玩app破解版(辅助)本来一直都是有方法(哔哩哔哩)...
透视妙计!wepoker俱乐部... 透视妙计!wepoker俱乐部辅助器(AApoker免费)确实真的是有辅助方法(哔哩哔哩)1、wep...
透视机巧!智星德州插件怎么下载... 透视机巧!智星德州插件怎么下载(透视)佛手在线是不是有挂(辅助)都是存在有教程(哔哩哔哩)1、首先打...