莱因电博

Li-e.cn

Li Internet Electronic Blog
@rss

编译远古的C语言程序时报错的一些解决方法

Some Solutions to Errors in Compiling Old C Language Programs

————————————————————

error: this statement may fall through [-Werror=implicit-fallthrough=]

make CFLAGS='-Wno-implicit-fallthrough'

error: right-hand operand of comma expression has no effect [-Werror=unused-value]

这是因为源码中有些函数定义不规范,高版本的gcc编译时会报错。解决办法是在 ./configure 后面加上 --disable-werror

--disable-werror -Wno-format-security

configure: error: Old ABI no longer supported

--host=arm-linux-gnueabi 
(C) 2019 - 2024 Li-e.cn莱因电博(立网电子博客) | Powered by Vercel , based on Hugo with Gists theme.