问题描述
想开发个PC端小软件(古老的MFC框架C++语言)对接阿里云物联网平台,PC软件阿里云物联网平台IOT设备,实现:PC软件上对IOT设备远程升级、获取状态、发送控制指令。
参考下面链接的内容,进行云端开发SDK安装,始终卡在了CMake上,能力有限,求助大神。
首页>阿里云物联网平台>云端开发指南>云端SDK参考(升级版)>C++ SDK使用说明
The C++ compiler ID is: MSVC
The C++ compiler version is: 19.34.31933.0
Build type: Release
Install libraries
darabonba_util could not be located, Building darabonba_util instead.
MSBuild version 17.4.0+18d5aef85 for .NET Framework
Performing update step for ‘_darabonba_util-populate’
fatal: unable to access ‘https://github.com/alibabacloud-sdk-cpp/dara-util.git/’: Failed to connect to github.com port 443 after 21138 ms: Timed out
CMake Error at E:/Custom/aliyun/test/cmake_build/_deps/_darabonba_util-subbuild/_darabonba_util-populate-prefix/tmp/_darabonba_util-populate-gitupdate.cmake:97 (execute_process):
execute_process failed command indexes:
1: “Child return code: 128”
D:\SoftwareWork\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(247,5): error MSB8066: “E:\Custom\aliyun est\cmake_build\_deps\_darabonba_util-subbuild\CMakeFiles\df770dc09b52ff901045e8e663d8394b\_darabonba_util-populate-update.rule;E:\Custom\aliyun est\cmake_build\_deps\_darabonba_util-subbuild\CMakeFiles\df770dc09b52ff901045e8e663d8394b\_darabonba_util-populate-patch.rule;E:\Custom\aliyun est\cmake_build\_deps\_darabonba_util-subbuild\CMakeFiles\df770dc09b52ff901045e8e663d8394b\_darabonba_util-populate-configure.rule;E:\Custom\aliyun est\cmake_build\_deps\_darabonba_util-subbuild\CMakeFiles\df770dc09b52ff901045e8e663d8394b\_darabonba_util-populate-build.rule;E:\Custom\aliyun est\cmake_build\_deps\_darabonba_util-subbuild\CMakeFiles\df770dc09b52ff901045e8e663d8394b\_darabonba_util-populate-install.rule;E:\Custom\aliyun est\cmake_build\_deps\_darabonba_util-subbuild\CMakeFiles\df770dc09b52ff901045e8e663d8394b\_darabonba_util-populate-test.rule;E:\Custom\aliyun est\cmake_build\_deps\_darabonba_util-subbuild\CMakeFiles\2e2172fcd42465b8acb751cedc212c83\_darabonba_util-populate-complete.rule;E:\Custom\aliyun est\cmake_build\_deps\_darabonba_util-subbuild\CMakeFiles\542465abfa052e8687788f687751af86\_darabonba_util-populate.rule”的自定义生成已退出,代码为 1。 [E:\Custom\aliyun est\cmake_build\_deps\_darabonba_util-subbuild\_darabonba_util-populate.vcxproj]
CMake Error at D:/SoftwareWork/CMake/share/cmake-3.24/Modules/FetchContent.cmake:1604 (message):
Build step for _darabonba_util failed: 1
Call Stack (most recent call first):
D:/SoftwareWork/CMake/share/cmake-3.24/Modules/FetchContent.cmake:1744:EVAL:2 (__FetchContent_directPopulate)
D:/SoftwareWork/CMake/share/cmake-3.24/Modules/FetchContent.cmake:1744 (cmake_language)
external/darabonba_util/CMakeLists.txt:18 (FetchContent_Populate)
Configuring incomplete, errors occurred!
See also “E:/Custom/aliyun/test/cmake_build/CMakeFiles/CMakeOutput.log”.
See also “E:/Custom/aliyun/test/cmake_build/CMakeFiles/CMakeError.log”.
CMake界面
已使用vcpkg安装依赖库
期望结果
顺利编译出阿里云物联网云端开发C++SDK,使用VS2022进行开发。
已尝试的方法
1、手动使用git bash下载“https://github.com/alibabacloud-sdk-cpp/dara-util.git“,并添加路径到环境变量。
插个眼,等找到答案在回来,hhh
按照https://github.com/aliyun/aliyun-openapi-cpp-sdk/blob/adf8ff200a94dd92dc8000dd816b931dceaa7def/README-CN.md
操作到最后一步,VS生成失败。。。报了一大堆错误,不知道缺少什么。。。
郁闷,C++这么难么,我这新旧SDK都弄不出来
这个新版本的C++ SDK有些问题需要修复,你先用原版的吧:
https://github.com/aliyun/aliyun-openapi-cpp-sdk/blob/adf8ff200a94dd92dc8000dd816b931dceaa7def/README-CN.md