:0:2: warning: ISO C++11 requires whitespace after the macro name
:0:7: warning: ISO C++11 requires whitespace after the macro name
In file included from /usr/include/aarch64-linux-gnu/c++/5/bits/c++config.h:482:0,
from /usr/include/c++/5/string:38,
from /home/nvidia/test/algo/build/aarch64/include/config.h:10,
from /home/nvidia/test/algo/build/aarch64/include/forwards.h:10,
from /home/nvidia/test/algo/build/aarch64/include/features.h:10,
from /usr/local/cuda-9.0/include/crt/host_config.h:179,
from /usr/local/cuda-9.0/include/host_config.h:50,
from /usr/local/cuda-9.0/include/cuda_runtime.h:78,
from :0:
/usr/include/aarch64-linux-gnu/c++/5/bits/os_defines.h:44:19: error: missing binary operator before token “(”
#if __GLIBC_PREREQ(2,15) && defined(_GNU_SOURCE)
^
In file included from /usr/include/c++/5/cwchar:44:0,
from /usr/include/c++/5/bits/postypes.h:40,
from /usr/include/c++/5/bits/char_traits.h:40,
from /usr/include/c++/5/string:40,
from /home/nvidia/test/algo/build/aarch64/include/config.h:10,
from /home/nvidia/test/algo/build/aarch64/include/forwards.h:10,
from /home/nvidia/test/algo/build/aarch64/include/features.h:10,
from /usr/local/cuda-9.0/include/crt/host_config.h:179,
from /usr/local/cuda-9.0/include/host_config.h:50,
from /usr/local/cuda-9.0/include/cuda_runtime.h:78,
from :0:
/usr/include/wchar.h:74:43: error: missing binary operator before token “(”
# if defined __cplusplus && __GNUC_PREREQ (4, 4)
^
In file included from /usr/include/sched.h:43:0,
from /usr/include/pthread.h:23,
from /usr/include/aarch64-linux-gnu/c++/5/bits/gthr-default.h:35,
from /usr/include/aarch64-linux-gnu/c++/5/bits/gthr.h:148,
from /usr/include/c++/5/ext/atomicity.h:35,
from /usr/include/c++/5/bits/basic_string.h:39,
from /usr/include/c++/5/string:52,
from /home/nvidia/test/algo/build/aarch64/include/config.h:10,
from /home/nvidia/test/algo/build/aarch64/include/forwards.h:10,
from /home/nvidia/test/algo/build/aarch64/include/features.h:10,
from /usr/local/cuda-9.0/include/crt/host_config.h:179,
from /usr/local/cuda-9.0/include/host_config.h:50,
from /usr/local/cuda-9.0/include/cuda_runtime.h:78,
from :0:
/usr/include/aarch64-linux-gnu/bits/sched.h:131:20: error: missing binary operator before token “(”
# if __GNUC_PREREQ (2, 91)
^
/usr/include/aarch64-linux-gnu/bits/sched.h:169:20: error: missing binary operator before token “(”
# if __GNUC_PREREQ (2, 91)
^
In file included from /usr/include/libio.h:56:0,
from /usr/include/stdio.h:74,
from /usr/include/c++/5/cstdio:42,
from /usr/include/c++/5/ext/string_conversions.h:43,
from /usr/include/c++/5/bits/basic_string.h:5249,
from /usr/include/c++/5/string:52,
from /home/nvidia/test/algo/build/aarch64/include/config.h:10,
from /home/nvidia/test/algo/build/aarch64/include/forwards.h:10,
from /home/nvidia/test/algo/build/aarch64/include/features.h:10,
from /usr/local/cuda-9.0/include/crt/host_config.h:179,
from /usr/local/cuda-9.0/include/host_config.h:50,
from /usr/local/cuda-9.0/include/cuda_runtime.h:78,
from :0:
/usr/include/aarch64-linux-gnu/sys/cdefs.h:41:20: error: missing binary operator before token “(”
# if __GNUC_PREREQ (4, 6) && !defined _LIBC
^
/usr/include/aarch64-linux-gnu/sys/cdefs.h:54:44: error: missing binary operator before token “(”
# if !defined __cplusplus && __GNUC_PREREQ (3, 3)
^
/usr/include/aarch64-linux-gnu/sys/cdefs.h:59:44: error: missing binary operator before token “(”
# if defined __cplusplus && __GNUC_PREREQ (2,8)
^
/usr/include/aarch64-linux-gnu/sys/cdefs.h:135:19: error: missing binary operator before token “(”
#if __GNUC_PREREQ (4,3)
^
/usr/include/aarch64-linux-gnu/sys/cdefs.h:148:19: error: missing binary operator before token “(”
#if __GNUC_PREREQ (2,97)
^
/usr/include/aarch64-linux-gnu/sys/cdefs.h:210:19: error: missing binary operator before token “(”
#if __GNUC_PREREQ (2,96)
^
/usr/include/aarch64-linux-gnu/sys/cdefs.h:218:19: error: missing binary operator before token “(”
#if __GNUC_PREREQ (4, 3)
^
/usr/include/aarch64-linux-gnu/sys/cdefs.h:228:19: error: missing binary operator before token “(”
#if __GNUC_PREREQ (2,96)
^
/usr/include/aarch64-linux-gnu/sys/cdefs.h:235:19: error: missing binary operator before token “(”
#if __GNUC_PREREQ (2,5)
^
/usr/include/aarch64-linux-gnu/sys/cdefs.h:244:19: error: missing binary operator before token “(”
#if __GNUC_PREREQ (3,1)
^
/usr/include/aarch64-linux-gnu/sys/cdefs.h:253:19: error: missing binary operator before token “(”
#if __GNUC_PREREQ (3,2)
^
/usr/include/aarch64-linux-gnu/sys/cdefs.h:265:19: error: missing binary operator before token “(”
#if __GNUC_PREREQ (2,8)
^
/usr/include/aarch64-linux-gnu/sys/cdefs.h:275:19: error: missing binary operator before token “(”
#if __GNUC_PREREQ (2,97)
^
/usr/include/aarch64-linux-gnu/sys/cdefs.h:284:19: error: missing binary operator before token “(”
#if __GNUC_PREREQ (3,3)
^
/usr/include/aarch64-linux-gnu/sys/cdefs.h:292:19: error: missing binary operator before token “(”
#if __GNUC_PREREQ (3,4)
^
/usr/include/aarch64-linux-gnu/sys/cdefs.h:306:19: error: missing binary operator before token “(”
#if __GNUC_PREREQ (3,2)
^
/usr/include/aarch64-linux-gnu/sys/cdefs.h:314:19: error: missing binary operator before token “(”
#if __GNUC_PREREQ (4,3)
^
/usr/include/aarch64-linux-gnu/sys/cdefs.h:329:44: error: missing binary operator before token “(”
#if (!defined __cplusplus || __GNUC_PREREQ (4,3) \
^
/usr/include/aarch64-linux-gnu/sys/cdefs.h:348:19: error: missing binary operator before token “(”
#if __GNUC_PREREQ (4,3)
^
/usr/include/aarch64-linux-gnu/sys/cdefs.h:357:20: error: missing binary operator before token “(”
#if !__GNUC_PREREQ (2,8)
^
/usr/include/aarch64-linux-gnu/sys/cdefs.h:362:20: error: missing binary operator before token “(”
#if !__GNUC_PREREQ (2,92)
^
/usr/include/aarch64-linux-gnu/sys/cdefs.h:369:19: error: missing binary operator before token “(”
#if GNUC_PREREQ (3,1) && !defined __GNUG
^
/usr/include/aarch64-linux-gnu/sys/cdefs.h:394:25: error: missing binary operator before token “(”
&& !__GNUC_PREREQ (4,7))
^
/usr/include/aarch64-linux-gnu/sys/cdefs.h:404:25: error: missing binary operator before token “(”
&& (!GNUC_PREREQ (4, 6) || defined __STRICT_ANSI))
^
In file included from /usr/local/cuda-9.0/include/crt/common_functions.h:67:0,
from /usr/local/cuda-9.0/include/common_functions.h:50,
from /usr/local/cuda-9.0/include/cuda_runtime.h:115,
from :0:
/usr/include/string.h:35:42: error: missing binary operator before token “(”
#if defined __cplusplus && __GNUC_PREREQ (4, 4)
^
/usr/include/string.h:640:56: error: missing binary operator before token “(”
&& defined __extern_always_inline && __GNUC_PREREQ (3,2)
^
In file included from /usr/local/cuda-9.0/include/crt/common_functions.h:149:0,
from /usr/local/cuda-9.0/include/common_functions.h:50,
from /usr/local/cuda-9.0/include/cuda_runtime.h:115,
from :0:
/usr/include/assert.h:37:42: error: missing binary operator before token “(”
#if defined __cplusplus && __GNUC_PREREQ (2,95)
^
/usr/include/assert.h:105:42: error: missing binary operator before token “(”
# if defined __cplusplus ? __GNUC_PREREQ (2, 6) : __GNUC_PREREQ (2, 4)
^
In file included from /usr/include/math.h:35:0,
from /usr/local/cuda-9.0/include/crt/math_functions.h:8831,
from /usr/local/cuda-9.0/include/crt/common_functions.h:258,
from /usr/local/cuda-9.0/include/common_functions.h:50,
from /usr/local/cuda-9.0/include/cuda_runtime.h:115,
from :0:
/usr/include/aarch64-linux-gnu/bits/huge_val.h:26:18: error: missing binary operator before token “(”
#if __GNUC_PREREQ(3,3)
^
/usr/include/aarch64-linux-gnu/bits/huge_val.h:28:20: error: missing binary operator before token “(”
#elif __GNUC_PREREQ(2,96)
^
In file included from /usr/local/cuda-9.0/include/crt/math_functions.h:8831:0,
from /usr/local/cuda-9.0/include/crt/common_functions.h:258,
from /usr/local/cuda-9.0/include/common_functions.h:50,
from /usr/local/cuda-9.0/include/cuda_runtime.h:115,
from :0:
/usr/include/math.h:455:42: error: missing binary operator before token “(”
#if defined __USE_ISOC99 && __GNUC_PREREQ(2,97)
^
CMake Error at jetson-inference_generated_cudaFont.cu.o.cmake:207 (message):
Error generating
/home/nvidia/test/algo/build/CMakeFiles/jetson-inference.dir/util/cuda/./jetson-inference_generated_cudaFont.cu.o
CMakeFiles/jetson-inference.dir/build.make:126: recipe for target ‘CMakeFiles/jetson-inference.dir/util/cuda/jetson-inference_generated_cudaFont.cu.o’ failed
make[2]: * [CMakeFiles/jetson-inference.dir/util/cuda/jetson-inference_generated_cudaFont.cu.o] Error 1
CMakeFiles/Makefile2:67: recipe for target ‘CMakeFiles/jetson-inference.dir/all’ failed
make[1]: * [CMakeFiles/jetson-inference.dir/all] Error 2
Makefile:127: recipe for target ‘all’ failed
解决方式如下:
编译时json库的头文件搜索路径必须选择json.h的上一级目录,不能使头文件所在目录,在引用json.h的地方加上”json/json.h”
cmake中指定上级目录:include_directories(FaceRecognition/jsoncpp/include/)