当前仓库属于暂停状态,部分功能使用受限,详情请查阅 仓库状态说明
29 Star 135 Fork 312

OpenHarmony / build_lite
暂停

 / 详情

c++引用openssl头文件报错

进行中
任务
创建于  
2022-11-17 18:54

【任务描述】
liteos L1系统,
CPP代码引用#include "openssl/evp.h"会报编译错误
[OHOS ERROR] ../../../third_party/openssl/include/openssl/bn.h:183:43: error: 'BN_ULONG' does not name a type; did you mean 'F_ULOCK'?
[OHOS ERROR] int BN_abs_is_word(const BIGNUM *a, const BN_ULONG w);
[OHOS ERROR] ^~~~~~~~
[OHOS ERROR] F_ULOCK
[OHOS ERROR] ../../../third_party/openssl/include/openssl/bn.h:186:39: error: 'BN_ULONG' does not name a type; did you mean 'F_ULOCK'?
[OHOS ERROR] int BN_is_word(const BIGNUM *a, const BN_ULONG w);
[OHOS ERROR] ^~~~~~~~
[OHOS ERROR] F_ULOCK
[OHOS ERROR] ../../../third_party/openssl/include/openssl/bn.h:214:22: error: 'BN_ULONG' was not declared in this scope

【解决方案】

【任务来源】

评论 (3)

和帅 创建了任务
xxlight 任务状态待办的 修改为进行中
展开全部操作日志

你好,麻烦提供下代码下载命令、编译命令、patch等复现步骤所需信息

yinchuang 负责人设置为yinchuang

你好,麻烦提供下代码下载命令、编译命令、patch等复现步骤所需信息 @和帅

搞个应用hello world 在应用的gn里添加下面两个配置 然后随便调下openssl的函数 编译的时候就会报错
include_dirs = ["//third_party/openssl/include"]
deps = ["//build/lite/config/component/openssl:openssl_shared"]

如果在加下面这个宏定义 就不会编译报错
defines = [OPENSSL_ARM_PLATFORM]

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(2)
Python
1
https://gitee.com/openharmony/build_lite.git
git@gitee.com:openharmony/build_lite.git
openharmony
build_lite
build_lite

搜索帮助