我正在使用 c++ 开发一个 google fusion table 项目。我尝试安装从https://github.com/google/google-api-cpp-client下载的 google api c++ 库。当我运行 >> ./prepare_denpendencies.py 时,出现如下所示的错误。
有人可以帮我找出问题所在吗?或者有人可以告诉我另一种在不安装库的情况下使用谷歌融合表的方法吗?谢谢!
其他信息:
cmake @2.8.12.2_0 (active) 使用 mac 端口安装。Mac OS X。
>> ./prepare_dependencies.py
Build packages = True
Download packages = True
Installing packages = True
Downloading files to /Users/zerocraft/KuaiPan/Course/ECEN489/google-api-cpp-client-0.1/external_dependencies
Installing packages to /Users/zerocraft/KuaiPan/Course/ECEN489/google-api-cpp-client-0.1/external_dependencies/install
Initializing....
cmake-2.8.10.2.tar.gz already exists - skipping download from http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz
cmake-2.8.10.2 already configured
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++ Building cmake-2.8.10.2 [all]
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>> Executing [make all] in /Users/zerocraft/KuaiPan/Course/ECEN489/google-api-cpp-client-0.1/external_dependencies/cmake-2.8.10.2
[ 1%] Built target cmIML_test
[ 4%] Built target cmsys
[ 5%] Built target cmsysTestDynload
[ 6%] Built target cmsys_c
[ 6%] Built target cmsysTestProcess
[ 6%] Built target cmsysTestSharedForward
[ 7%] Built target cmsysTestsC
[ 9%] Built target cmsysTestsCxx
[ 12%] Built target cmzlib
[ 12%] Building C object Utilities/cmcurl/CMakeFiles/cmcurl.dir/cookie.c.o
In file included from /Users/zerocraft/KuaiPan/Course/ECEN489/google-api-cpp-client-0.1/external_dependencies/cmake-2.8.10.2/Utilities/cmcurl/cookie.c:93:
/Users/zerocraft/KuaiPan/Course/ECEN489/google-api-cpp-client-0.1/external_dependencies/cmake-2.8.10.2/Utilities/cmcurl/strequal.h:41:8: error:
expected parameter declarator
size_t strlcat(char *dst, const char *src, size_t siz);
^
/usr/include/secure/_string.h:111:44: note: expanded from macro 'strlcat'
__builtin___strlcat_chk (dest, src, len, __darwin_obsz (dest))
^
/usr/include/secure/_common.h:39:62: note: expanded from macro '__darwin_obsz'
#define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIF...
^
/usr/include/secure/_common.h:30:32: note: expanded from macro
'_USE_FORTIFY_LEVEL'
# define _USE_FORTIFY_LEVEL 2
^
In file included from /Users/zerocraft/KuaiPan/Course/ECEN489/google-api-cpp-client-0.1/external_dependencies/cmake-2.8.10.2/Utilities/cmcurl/cookie.c:93:
/Users/zerocraft/KuaiPan/Course/ECEN489/google-api-cpp-client-0.1/external_dependencies/cmake-2.8.10.2/Utilities/cmcurl/strequal.h:41:8: error:
expected ')'
/usr/include/secure/_string.h:111:44: note: expanded from macro 'strlcat'
__builtin___strlcat_chk (dest, src, len, __darwin_obsz (dest))
^
/usr/include/secure/_common.h:39:62: note: expanded from macro '__darwin_obsz'
#define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIF...
^
/usr/include/secure/_common.h:30:32: note: expanded from macro
'_USE_FORTIFY_LEVEL'
# define _USE_FORTIFY_LEVEL 2
^
/Users/zerocraft/KuaiPan/Course/ECEN489/google-api-cpp-client-0.1/external_dependencies/cmake-2.8.10.2/Utilities/cmcurl/strequal.h:41:8: note:
to match this '('
/usr/include/secure/_string.h:111:44: note: expanded from macro 'strlcat'
__builtin___strlcat_chk (dest, src, len, __darwin_obsz (dest))
^
/usr/include/secure/_common.h:39:53: note: expanded from macro '__darwin_obsz'
#define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIF...
^
In file included from /Users/zerocraft/KuaiPan/Course/ECEN489/google-api-cpp-client-0.1/external_dependencies/cmake-2.8.10.2/Utilities/cmcurl/cookie.c:93:
/Users/zerocraft/KuaiPan/Course/ECEN489/google-api-cpp-client-0.1/external_dependencies/cmake-2.8.10.2/Utilities/cmcurl/strequal.h:41:8: warning:
type specifier missing, defaults to 'int' [-Wimplicit-int]
size_t strlcat(char *dst, const char *src, size_t siz);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/secure/_string.h:111:44: note: expanded from macro 'strlcat'
__builtin___strlcat_chk (dest, src, len, __darwin_obsz (dest))
^~~~~~~~~~~~~~~~~~~~
/usr/include/secure/_common.h:39:31: note: expanded from macro '__darwin_obsz'
#define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIF...
^~~~~~~~~~~~~~~~~~~~~
In file included from /Users/zerocraft/KuaiPan/Course/ECEN489/google-api-cpp-client-0.1/external_dependencies/cmake-2.8.10.2/Utilities/cmcurl/cookie.c:93:
/Users/zerocraft/KuaiPan/Course/ECEN489/google-api-cpp-client-0.1/external_dependencies/cmake-2.8.10.2/Utilities/cmcurl/strequal.h:41:8: error:
conflicting types for '__builtin___strlcat_chk'
/usr/include/secure/_string.h:111:3: note: expanded from macro 'strlcat'
__builtin___strlcat_chk (dest, src, len, __darwin_obsz (dest))
^
/Users/zerocraft/KuaiPan/Course/ECEN489/google-api-cpp-client-0.1/external_dependencies/cmake-2.8.10.2/Utilities/cmcurl/strequal.h:41:8: note:
'__builtin___strlcat_chk' is a builtin with type 'unsigned long (char *,
const char *, unsigned long, unsigned long)'
/usr/include/secure/_string.h:111:3: note: expanded from macro 'strlcat'
__builtin___strlcat_chk (dest, src, len, __darwin_obsz (dest))
^
1 warning and 3 errors generated.
make[2]: *** [Utilities/cmcurl/CMakeFiles/cmcurl.dir/cookie.c.o] Error 1
make[1]: *** [Utilities/cmcurl/CMakeFiles/cmcurl.dir/all] Error 2
make: *** [all] Error 2
Failed command: [make all] in /Users/zerocraft/KuaiPan/Course/ECEN489/google-api-cpp-client-0.1/external_dependencies/cmake-2.8.10.2
Failed to make cmake-2.8.10.2