C++ libaws&x2B+;使用命令时occors出错";制造;
我想在我的电脑上使用。所以,我必须使用LIbWW++,它是一个允许与Amazon Web服务通信的C++库。 好的,这是我的问题: libaws++的版本不可用。我用谷歌搜索“libaws++”,只找到了libaws。我不知道libaws是否是libaws++。他们都曾与Amazon Web服务通信。所以我从下载libaws 以下是我安装libaws的过程:C++ libaws&x2B+;使用命令时occors出错";制造;,c++,C++,我想在我的电脑上使用。所以,我必须使用LIbWW++,它是一个允许与Amazon Web服务通信的C++库。 好的,这是我的问题: libaws++的版本不可用。我用谷歌搜索“libaws++”,只找到了libaws。我不知道libaws是否是libaws++。他们都曾与Amazon Web服务通信。所以我从下载libaws 以下是我安装libaws的过程: tar libaws-0.9.2.tar.gz cd-libaws-0.9.2 cp~/libaws\u patch\u for_fade
[ 28%] Building CXX object src/CMakeFiles/aws.dir/api/connectionpool.cpp.o
In file included from /home/lx/Nutstore/cloud/libaws-0.9.2/include/libaws/aws.h: 26:0,
from /home/lx/Nutstore/cloud/libaws-0.9.2/include/libaws/connec tionpool.h:22,
from /home/lx/Nutstore/cloud/libaws-0.9.2/src/api/connectionpoo l.cpp:16:
/home/lx/Nutstore/cloud/libaws-0.9.2/include/libaws/sqsresponse.h:124:9: error: a€?uint64_ta€? does not name a type
In file included from /home/lx/Nutstore/cloud/libaws-0.9.2/include/libaws/aws.h: 29:0,
from /home/lx/Nutstore/cloud/libaws-0.9.2/include/libaws/connec tionpool.h:22,
from /home/lx/Nutstore/cloud/libaws-0.9.2/src/api/connectionpoo
/home/lx/Nutstore/cloud/libaws-0.9.2/include/libaws/sqsresponse.h:124:9: error: a€?uint64_ta€? does not name a type
In file included from /home/lx/Nutstore/cloud/libaws-0.9.2/include/libaws/aws.h: 29:0,
from /home/lx/Nutstore/cloud/libaws-0.9.2/include/libaws/connec tionpool.h:22,
from /home/lx/Nutstore/cloud/libaws-0.9.2/src/api/connectionpoo l.cpp:16:
/home/lx/Nutstore/cloud/libaws-0.9.2/include/libaws/sdbresponse.h:105:20: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
.....
make[2]: *** [src/CMakeFiles/aws.dir/api/connectionpool.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/aws.dir/all] Error 2
make: *** [all] Error 2
我在Google和stackoverflow上搜索,没有得到任何有用的信息。将#include
添加到这些头文件的顶部
uint64_t是标准类型,应该可以正常工作
(当然,除非你在某个不支持64位整数的奇怪平台上…刚刚用gnu编译器4.9.x编译了这个。对于较新版本的编译器,编译libaws需要更多的步骤 以下是我必须做的: 1) 在所有其他include语句之后,将以下行添加到libaws-0.9.2/include/libaws/*.h中的头文件中:
#include <stdint.h>
#include <getopt.h>
仅供参考:如果您使用的是GNUC编译器,那么在其他CMAKE命令的末尾,可能需要一行类似的C部分代码。文件末尾的类似内容可能会起作用,但我没有尝试过:
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fpermissive -Wignored-qualifiers")
完成这些操作后,以下是编译步骤:
cd libaws-0.9.2
mkdir libawsbuild
cd libawsbuild
cmake ..
make
成功后,您可能还需要将config.h从libawsbuild/include复制到libaws-0.9.2/include/libaws,以便编译器在编译实际使用libaws所编写的任何代码时,在预期的位置找到config.h。(尽管这可能只是我个人makefile的配置方式。不要引用我的话。)
cd libaws-0.9.2
mkdir libawsbuild
cd libawsbuild
cmake ..
make