Azure Storage CPP & VCPKG
Azure Storage CPP & VCPKG
有一个小型C++应用来测试Visual Studio 2019中的某些Azure Blob存储功能。 已按照此处的说明使用 vcpkg 安装 azure-storage-cpp sdk,但是当我尝试运行该应用程序时,出现以下链接器错误:
AzureConsoleApp.obj : 错误LNK2019: 未解析的外部符号 "__declspec(dllimport(私有:无效__cdecl azure::storage::cloud_storage_account::initialize_default_endpoints(bool(" (__imp_?initialize_default_endpoints@cloud_storage_account@storage@azure@@AEAAX_N@Z( 在函数"公共:__cdecl azure::storage::cloud_storage_account::cloud_storage_account(class azure::storage::storage_credentials const &,bool(" (??0cloud_storage_account@storage@azure@@QEAA@AEBVstorage_credentials@12@_N@Z(
vcpkg 报告已安装以下内容:
azure-storage-cpp:x64-windows-static 7.0.0
Microsoft Azure Storage Client SDK for C++ A cli...
我需要为应用程序使用 azure-storage-cpp 的静态版本,因此使用 x64-windows-static。
通过阅读 vcpkg 文档,它是一种安装并忘记类型的工具,工具本身指出:
所有 MSBuild C++ 项目现在都可以 #include 任何已安装的库。 链接将自动处理。安装新库将 使它们立即可用。
我错过了什么?
在包含 Azure Storage SDK标头之前需要定义 #define _NO_WASTORAGE_API,并在链接器输入中手动包含所有必需的 Azure Storage SDK 参考库(xmllite.lib、bcrypt.lib、rpcrt4.lib、Crypt32.lib、Winhttp.lib(。
在这里找到我的答案。
- .cpp和.h文件中的模板专用化声明
- 为什么两个不同的未命名名称空间可以共存于一个cpp文件中
- Linux的Cpp上的计时器
- 如何运行位于boost/libs/python/example/tutorial目录中的hello.cpp和Jamfil
- 命名空间中具有.h和.cpp文件的类
- 内置函数可查看CPP中的成员变量
- 无法编译 rtmidi 测试 cmidiin.cpp 文件, 非法指令
- Cpp-Tuple使用带有变量的get
- C++-试图将函数指针推回到另一个CPP文件中的矢量时出错
- 有充分的理由在h文件中使用include保护而不是cpp文件吗
- 如何通过cpp程序运行shell脚本
- 使用2个键的cpp-stl::优先级队列排序不正确
- cpp二进制搜索问题,计算给定数组中输入元素的出现次数
- 如何在cpp文件之间切换窗口?在Qt中
- 在 .h 文件中的类中声明静态变量和在.cpp文件中声明"global"变量有什么区别
- 我需要知道编译器如何在cpp中使用析构函数
- 如何在cpp.中使用协议缓冲区存储大缓冲区/数组(char/int)
- 无法在UE4中包含BP类到CPP类
- C++:Application.cpp中抛出了未解析的外部符号(解决方案在问题的末尾,供未来的读者参考)
- Azure Storage CPP & VCPKG