Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在使用 SDK 时,OSS 库报 curl、lthread 找不到定义 #16

Closed
RenaiBi opened this issue Jun 4, 2019 · 1 comment
Closed

在使用 SDK 时,OSS 库报 curl、lthread 找不到定义 #16

RenaiBi opened this issue Jun 4, 2019 · 1 comment

Comments

@RenaiBi
Copy link

RenaiBi commented Jun 4, 2019

我在 ubunt 16.04 系统下按照官方的指导,下载 oss 源码,编译,安装后(均无报错),再使用官方的示例代码,在编译的时候,libalibabacloud-oss-cpp-sdk.a 找不到 curl 相关函数的定义,检测 sdk 目录下的 CMakeLists.txt 文件,发现只有当 BUILD_SHARED_LIBS 开关打开后才会将 curl 相关的库链接进去,而 BUILD_SHARED_LIBS 开关在主目录下的 CMakeLists.txt 中默认是关闭的。

所以,要么在 cmake 的时候打开 BUILD_SHARED_LIBS ,要么在 CMakeLists.txt 中默认将 BUILD_SHARED_LIBS 打开。

@huiguangjun
Copy link
Collaborator

构建静态库时,不需要把这些依赖库打进去。
在生成 so 或者 执行程序 阶段, 再把这些依赖库链接进来。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants