当前位置: 首页 > news >正文

如何在网站上做社交的链接廊坊做网站价格

如何在网站上做社交的链接,廊坊做网站价格,企业应该做几个网站,网站推广的最终目的是什么在本文中#xff0c;我们将介绍如何编译AWS SDK C库#xff0c;以便在您的项目中使用。AWS SDK C库提供了与Amazon Web Services交互的接口#xff0c;允许您在C应用程序中使用AWS服务。 一、准备工作 在开始编译AWS SDK C库之前#xff0c;请确保您的系统已经安装了以下…在本文中我们将介绍如何编译AWS SDK C库以便在您的项目中使用。AWS SDK C库提供了与Amazon Web Services交互的接口允许您在C应用程序中使用AWS服务。 一、准备工作 在开始编译AWS SDK C库之前请确保您的系统已经安装了以下依赖项 CMake版本3.13或更高版本 支持C11的编译器我是使用的是MSVC 2017 64位 二、下载AWS SDK C源代码 首先您需要从GitHub上的AWS SDK C存储库下载源代码。您可以通过以下命令克隆存储库 git clone --recurse-submodules https://github.com/aws/aws-sdk-cpp cd aws-sdk-cpp三、配置编译环境 接下来您需要使用CMake来配置编译环境。这将生成适用于您的系统的构建文件。您可以通过以下命令来配置编译环境 mkdir BUILD_DIR cd BUILD_DIR # 编译Release版本 cmake ..\aws-sdk-cpp -G Visual Studio 15 2017 Win64 -DCMAKE_BUILD_TYPERelease -DBUILD_ONLYs3 # 开始编译 cmake --build . --configRelease # 安装到指定目录需要管理员权限 cmake --install . --configReleasecmake --install 会把库文件安装到 C:\Program Files\aws-cpp-sdk-all 目录 四、编译测试代码验证 4.1 创建hello_s3.cpp文件 #include aws/core/Aws.h #include aws/s3/S3Client.h #include iostream #include aws/core/auth/AWSCredentialsProviderChain.h using namespace Aws; using namespace Aws::Auth;/** A Hello S3 starter application which initializes an Amazon Simple Storage Service (Amazon S3) client* and lists the Amazon S3 buckets in the selected region.** main function** Usage: hello_s3**/int main(int argc, char **argv) {Aws::SDKOptions options;// Optionally change the log level for debugging. // options.loggingOptions.logLevel Utils::Logging::LogLevel::Debug;Aws::InitAPI(options); // Should only be called once.int result 0;{Aws::Client::ClientConfiguration clientConfig;// Optional: Set to the AWS Region (overrides config file).// clientConfig.region us-east-1;// You dont normally have to test that you are authenticated. But the S3 service permits anonymous requests, thus the s3Client will return success and 0 buckets even if you are unauthenticated, which can be confusing to a new user. auto provider Aws::MakeSharedDefaultAWSCredentialsProviderChain(alloc-tag);auto creds provider-GetAWSCredentials();if (creds.IsEmpty()) {std::cerr Failed authentication std::endl;}Aws::S3::S3Client s3Client(clientConfig);auto outcome s3Client.ListBuckets();if (!outcome.IsSuccess()) {std::cerr Failed with error: outcome.GetError() std::endl;result 1;} else {std::cout Found outcome.GetResult().GetBuckets().size() buckets\n;for (auto bucket: outcome.GetResult().GetBuckets()) {std::cout bucket.GetName() std::endl;}}}Aws::ShutdownAPI(options); // Should only be called once.return result; } 4.2 创建CmakeLists.txt # Set the minimum required version of CMake for this project. cmake_minimum_required(VERSION 3.13)# Set the AWS service components used by this project. set(SERVICE_COMPONENTS s3)# Set this projects name. project(hello_s3)# Set the C standard to use to build this target. # At least C 11 is required for the AWS SDK for C. set(CMAKE_CXX_STANDARD 11)# Use the MSVC variable to determine if this is a Windows build. set(WINDOWS_BUILD ${MSVC})if (WINDOWS_BUILD) # Set the location where CMake can find the installed libraries for the AWS SDK.string(REPLACE ; /aws-cpp-sdk-all; SYSTEM_MODULE_PATH ${CMAKE_SYSTEM_PREFIX_PATH}/aws-cpp-sdk-all)list(APPEND CMAKE_PREFIX_PATH ${SYSTEM_MODULE_PATH}) endif ()# Find the AWS SDK for C package. find_package(AWSSDK REQUIRED COMPONENTS ${SERVICE_COMPONENTS})if (WINDOWS_BUILD AND AWSSDK_INSTALL_AS_SHARED_LIBS)# Copy relevant AWS SDK for C libraries into the current binary directory for running and debugging.# set(BIN_SUB_DIR /Debug) # if you are building from the command line you may need to uncomment this# and set the proper subdirectory to the executables location.AWSSDK_CPY_DYN_LIBS(SERVICE_COMPONENTS ${CMAKE_CURRENT_BINARY_DIR}${BIN_SUB_DIR}) endif ()add_executable(${PROJECT_NAME}hello_s3.cpp)target_link_libraries(${PROJECT_NAME}${AWSSDK_LINK_LIBRARIES}) 4.3 使用cmake构建 mkdir my_project_build cd my_project_build cmake ../# 然后运行hello_s3 ./hello_s3hello_s3会打印出所有bucket名字前提是已经配置了AWS的凭证。
http://www.hkea.cn/news/14529949/

相关文章:

  • 网站模板自助进行公司网站建设方案
  • 免费写作网站如何创建一个html网页
  • 河北交通建设投资集团公司网站佛山网络公司哪家便宜
  • 上海网站建设设计鞍山市建设局网站
  • 做网站枣庄wordpress插件 订阅
  • 深圳网站系统找哪里室内装修设计软件培训
  • 微友说是做网站维护让帮忙投注html5网页设计作业免费
  • 青田建设局网站做网站横幅的图片多大
  • 沈阳建立网站请写出html文档的代码
  • 配置jsp网站开发环境网站建设最新资讯
  • 域名备案期间 网站访问建设一个公司网站需要多少钱
  • 高端婚纱摄影网站抖音关键词排名软件
  • 网页设计与网站建设论文软件下载网站开发
  • 电子商务就是建网站凡科可以做社交网站吗
  • 低价自适应网站建设优化建站网页实时翻译软件
  • 阿里云做的网站怎么备份加强网站技术建设
  • 中国做的比较好的电商网站有哪些wordpress判断页面
  • 最近免费韩国电影hd无WordPress修改seo标题符号
  • 站群搭建兼职写好评15元一条
  • 成都网站备案太慢快速装修公司
  • 河北省建设招标网站科技期刊网站建设
  • 北京大兴最专业的网站建设公司网站目标人群
  • 做海报的网站有哪些内容专业定制网站需要什么技能
  • 携程网站 建设平台分析建设银行安徽 招聘网站
  • 杭州强龙网站建设长沙河东做网站
  • 苏州建网站收费在线做爰直播网站
  • 陕煤化工建设集团网站福州seo关键字推广
  • 本网站仅支持ie浏览器如何建立一个网站详细步骤
  • 上海网站建设过程wordpress设置ssl证书
  • 网站制作经典案例马来西亚网站建设