Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux-clang compile error #22

Closed
nifflin opened this issue Sep 14, 2016 · 1 comment
Closed

linux-clang compile error #22

nifflin opened this issue Sep 14, 2016 · 1 comment

Comments

@nifflin
Copy link

nifflin commented Sep 14, 2016

[21%]: compiling.release src/tbox/libc/string/wcsrchr.c
error: src/tbox/libc/string/strlcpy.c:52:12: error: implicit declaration of function 'strlcpy' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
return strlcpy(s1, s2, n);
^
1 error generated.
make[2]: *** [../3rdparty/tbox/src/tbox-stamp/tbox-build] Error 255
make[1]: *** [3rdparty/CMakeFiles/tbox.dir/all] Error 2
make: *** [all] Error 2

@waruqi
Copy link
Member

waruqi commented Sep 14, 2016

看错误 ,已经 #include <string.h>了,但是还是没找到 strlcpy的声明,导致编译器警告。。

请确认下,include的搜索路径中,是否有重名string.h导致冲突了。。

或者 可以临时改下tbox/xmake.lua,将警告级别改为 set_warning("none"),禁用 Werror,就可以通过了。。

谢谢

@waruqi waruqi closed this as completed Sep 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants