You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
环境:ubuntu16.04,gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2~16.04)
Release报错如下:
In file included from /usr/include/string.h:635,
from /usr/include/memory.h:29,
from /home/z/third_lib/behaviac/inc/behaviac/common/memory/memory.h:26,
from /home/z/third_lib/behaviac/src/common/file/listfiles.cpp:14:
In function ‘char* strcat(char*, const char*)’,
inlined from ‘int listfiles_readfile(const listfiles_dir_t*, listfiles_file_t*)’ at /home/z/third_lib/behaviac/src/common/file/listfiles.cpp:211:22:
/usr/include/x86_64-linux-gnu/bits/string3.h:148:33: error: ‘char* __builtin___strcat_chk(char*, const char*, long unsigned int)’ accessing 4097 or more bytes at offsets 0 and 4096 may overlap 1 byte at offset 4096 [-Werror=restrict]
148 | return __builtin___strcat_chk (__dest, __src, __bos (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
CMakeFiles/libbehaviac.dir/build.make:900: recipe for target 'CMakeFiles/libbehaviac.dir/src/common/file/listfiles.cpp.o' failed
make[2]: *** [CMakeFiles/libbehaviac.dir/src/common/file/listfiles.cpp.o] Error 1
CMakeFiles/Makefile2:513: recipe for target 'CMakeFiles/libbehaviac.dir/all' failed
make[1]: *** [CMakeFiles/libbehaviac.dir/all] Error 2
Makefile:102: recipe for target 'all' failed
make: *** [all] Error 2
环境:ubuntu16.04,gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2~16.04)
Release报错如下:
In file included from /usr/include/string.h:635,
from /usr/include/memory.h:29,
from /home/z/third_lib/behaviac/inc/behaviac/common/memory/memory.h:26,
from /home/z/third_lib/behaviac/src/common/file/listfiles.cpp:14:
In function ‘char* strcat(char*, const char*)’,
inlined from ‘int listfiles_readfile(const listfiles_dir_t*, listfiles_file_t*)’ at /home/z/third_lib/behaviac/src/common/file/listfiles.cpp:211:22:
/usr/include/x86_64-linux-gnu/bits/string3.h:148:33: error: ‘char* __builtin___strcat_chk(char*, const char*, long unsigned int)’ accessing 4097 or more bytes at offsets 0 and 4096 may overlap 1 byte at offset 4096 [-Werror=restrict]
148 | return __builtin___strcat_chk (__dest, __src, __bos (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
CMakeFiles/libbehaviac.dir/build.make:900: recipe for target 'CMakeFiles/libbehaviac.dir/src/common/file/listfiles.cpp.o' failed
make[2]: *** [CMakeFiles/libbehaviac.dir/src/common/file/listfiles.cpp.o] Error 1
CMakeFiles/Makefile2:513: recipe for target 'CMakeFiles/libbehaviac.dir/all' failed
make[1]: *** [CMakeFiles/libbehaviac.dir/all] Error 2
Makefile:102: recipe for target 'all' failed
make: *** [all] Error 2
Win编译,CMake构建,使用VS2019,报错全为:
错误 C2220 以下警告被视为错误 (编译源文件 D:\workplace\behaviac\src\agent\state_t.cpp) libbehaviac C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\algorithm 1310
The text was updated successfully, but these errors were encountered: