gpt4 book ai didi

c++ - 使用 Makefile 的交叉编译使用了错误的包含

转载 作者:太空宇宙 更新时间:2023-11-04 11:10:54 25 4
gpt4 key购买 nike

我正在尝试为 MIPS 处理器编译音频文件库

这是我的配置命令:

./configure  --build i686-pc-linux-gnu --host mipsel-gcw0-linux-uclibc --prefix=/opt/gcw0-toolchain -target mipsel-gcw0-linux-uclibc

然后当我运行 Make 时,它​​有时会包含我的计算机标题,例如:

In file included from /opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/include/features.h:416:0,
from /usr/include/i386-linux-gnu/sys/types.h:25,
from ./../AudioFormat.h:26,
from Module.h:25,
from ModuleState.h:25,
from ModuleState.cpp:23:
/usr/include/i386-linux-gnu/bits/mathcalls.h:115:56: error: declaration does not declare anything [-fpermissive]
__MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr)) __nonnull ((2));
^
/usr/include/i386-linux-gnu/bits/mathcalls.h:115:56: error: declaration does not declare anything [-fpermissive]
__MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr)) __nonnull ((2));
^
/usr/include/i386-linux-gnu/bits/mathcalls.h:115:56: error: declaration does not declare anything [-fpermissive]
__MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr)) __nonnull ((2));
^
make[3]: *** [ModuleState.lo] Error 1
make[3]: Leaving directory `/root/Downloads/audiofile-0.3.6/libaudiofile/modules'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/Downloads/audiofile-0.3.6/libaudiofile'

我尝试在我的配置命令中使用所有不同的文件夹,但每次都会发生同样的错误

最佳答案

--build configure 选项用于指示构建环境,因为你正在做交叉编译,所以你应该使用像

./configure  --build mipsel-gcw0-linux-uclibc --host mipsel-gcw0-linux-uclibc ...

顺便说一句,--target 选项在您的情况下是不必要的,因为您没有构建编译器、链接器或类似的东西。

关于c++ - 使用 Makefile 的交叉编译使用了错误的包含,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23274315/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com