我使用我为此平台构建的工具链(MIPS openwrt)将ffmpeg源代码交叉编译为mips-openwrt目标。
然后ffmpeg make 在uclibc头文件stdlib.h中给出以下错误,如下所示:
In file included from ./libavutil/avassert.h:30:0,
from libavfilter/avfilter.c:23:
/home/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.6.3/../../../../mips-openwrt-linux-uclibc/sys-include/stdlib.h:546:14: error: expected identifier or '(' before 'void'
/home/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.6.3/../../../../mips-openwrt-linux-uclibc/sys-include/stdlib.h:546:14: error: expected ')' before numeric constant
围绕该行号的uclibc stdlib.h中的代码是
#ifdef __USE_ISOC99
__BEGIN_NAMESPACE_C99
/* Terminate the program with STATUS without calling any of the
functions registered with `atexit' or `on_exit'. */
extern void _Exit (int __status) __THROW __attribute__ ((__noreturn__));
__END_NAMESPACE_C99
#endif
__BEGIN_NAMESPACE_STD
/* Return the value of envariable NAME, or NULL if it doesn't exist. */
extern char *getenv (__const char *__name) __THROW __nonnull ((1)) __wur; << This is the line where the compilation error is
__END_NAMESPACE_STD
任何有助于恢复此功能的指示都会有所帮助。