GithubHelp home page GithubHelp logo

Comments (2)

huiguangjun avatar huiguangjun commented on July 19, 2024

和 RTTI 的编译选项有关系, 当前版本 默认关闭 rtti ,即构建时增加了 -fno-rtti 选项,所以你的代码编译时,也需要加上 -fno-rtti 。

之后的版本会增加一个 CMake 选项, ENABLE_RTTI, 默认为 ON ,业务方可以根据需求设置。

from aliyun-oss-cpp-sdk.

rongliangtang avatar rongliangtang commented on July 19, 2024

在Mac 10.15 catalina,使用OpenlSSL 1.0.2p打包静态库libalibabacloud-oss-cpp-sdk.a(15.7M)

其中有个方法: bool OSSdeleteObject(const std::string& accessKeyId, const std::string& accessKeySecret, const std::string& endpoint, const std::string& bucketName, const std::string& objName) { std::string ObjectName = objName;

InitializeSdk();

ClientConfiguration conf;
OssClient client(endpoint, accessKeyId, accessKeySecret, conf);

DeleteObjectRequest request(bucketName, ObjectName);

auto outcome = client.DeleteObject(request);

if (!outcome.isSuccess()) {
	std::cout << "DeleteObject fail" <<
		",code:" << outcome.error().Code() <<
		",message:" << outcome.error().Message() <<
		",requestId:" << outcome.error().RequestId() << std::endl;
	ShutdownSdk();
	return false;
}

ShutdownSdk();
return true;

}

在编译案例时(已导入libcrypto.a, libcurl.a, libssl.a),遇到linker错误: Undefined symbols for architecture x86_64: "typeinfo for AlibabaCloud::OSS::OssObjectRequest", referenced from: typeinfo for AlibabaCloud::OSS::DeleteObjectRequest in YEEOss.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

注释掉删除Object方法中的: DeleteObjectRequest request(bucketName, ObjectName);

编辑正常,upload,download功能都没问题。

请教是在哪个环节可能出现错误?谢谢

你好,请问这个问题您解决了吗,我最近也遇到了这个问题!

from aliyun-oss-cpp-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.