OSS C/C++ SDK分享交流区
ReOSS C/CSDK分享交流区
下载OSS SDK C版本,在centos系统上编译SDK,按照说明依次安装了依赖库
1)安装libcurl
cd curl-7.47.1/
./configure
make
sudo make install
2)安装apr
cd apr-1.5.2/
./configure
make
sudo make install
3)安装apr-util
cd apr-util-1.5.4/
./configure --with-apr=/usr/local/apr/
make
sudo make install
4)安装minixml
cd mxml-2.9/
./configure
make
sudo make install
5)安装CMake
cd cmake-3.5.0-rc3/
./configure
make
sudo make install
都安装成功,在最后一步编译SDK代码的时候,出现下面的错误
make
[ 1%] Building C object CMakeFiles/oss_c_sdk_static.dir/src/aos_log.c.o
In file included from /usr/local/apr/include/apr-1/apr_time.h:25,
from /root/oss_sdk/aliyun-oss-c-sdk-1.0.0/src/aos_define.h:14,
from /root/oss_sdk/aliyun-oss-c-sdk-1.0.0/src/aos_log.h:4,
from /root/oss_sdk/aliyun-oss-c-sdk-1.0.0/src/aos_log.c:1:
/usr/local/apr/include/apr-1/apr.h:358: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘apr_off_t’
In file included from /root/oss_sdk/aliyun-oss-c-sdk-1.0.0/src/aos_define.h:15,
from /root/oss_sdk/aliyun-oss-c-sdk-1.0.0/src/aos_log.h:4,
from /root/oss_sdk/aliyun-oss-c-sdk-1.0.0/src/aos_log.c:1:
/usr/local/apr/include/apr-1/apr_strings.h:317: 错误:expected declaration specifiers or ‘...’ before ‘apr_off_t’
/usr/local/apr/include/apr-1/apr_strings.h:335: 错误:expected ‘)’ before ‘*’ token
/usr/local/apr/include/apr-1/apr_strings.h:372: 错误:expected ‘)’ before ‘size’
In file included from /usr/local/apr/include/apr-1/apr_file_io.h:29,
from /root/oss_sdk/aliyun-oss-c-sdk-1.0.0/src/aos_define.h:18,
from /root/oss_sdk/aliyun-oss-c-sdk-1.0.0/src/aos_log.h:4,
from /root/oss_sdk/aliyun-oss-c-sdk-1.0.0/src/aos_log.c:1:
/usr/local/apr/include/apr-1/apr_file_info.h:198: 错误:expected specifier-qualifier-list before ‘apr_off_t’
In file included from /root/oss_sdk/aliyun-oss-c-sdk-1.0.0/src/aos_define.h:18,
from /root/oss_sdk/aliyun-oss-c-sdk-1.0.0/src/aos_log.h:4,
from /root/oss_sdk/aliyun-oss-c-sdk-1.0.0/src/aos_log.c:1:
/usr/local/apr/include/apr-1/apr_file_io.h:685: 错误:expected declaration specifiers or ‘...’ before ‘apr_off_t’
/usr/local/apr/include/apr-1/apr_file_io.h:909: 错误:expected declaration specifiers or ‘...’ before ‘apr_off_t’
In file included from /usr/local/apr/include/apr-1/apr_portable.h:32,
from /root/oss_sdk/aliyun-oss-c-sdk-1.0.0/src/aos_log.c:2:
/usr/local/apr/include/apr-1/apr_network_io.h:576: 错误:expected declaration specifiers or ‘...’ before ‘apr_off_t’
make[2]: *** [CMakeFiles/oss_c_sdk_static.dir/src/aos_log.c.o] 错误 1
make[1]: *** [CMakeFiles/oss_c_sdk_static.dir/all] 错误 2
make: *** [all] 错误 2
赞0
踩0