gpt4 book ai didi

c++ - XGCC stdarg.h 没有这样的文件或目录

转载 作者:太空宇宙 更新时间:2023-11-04 04:33:14 26 4
gpt4 key购买 nike

我在我的项目中包含了 vsprintf。但是,当我编译它时,我收到以下错误。

/opt/xgcc/decstation-ultrix/bin/xgcc -DIN_USER_MODE -c -I../userprog -I../threads -G 0 -Wall -O2 -DCHANGED -c vsprintf.c
vsprintf.c:12: stdarg.h: No such file or directory
make[1]: *** [vsprintf.o] Error 1
rm add.o
make[1]: Leaving directory `/home/banana/se31/code/test'
make: *** [all] Error 2

vsprintf 的第 12 行包含以下内容:

#include <stdarg.h>

我使用以下短程序验证了 stdarg.h 已正确安装在我的系统中。

//test.c and test.cpp
#include <stdarg.h>

int main(void)
{
return 0;
}

当我运行 gcc test.c 或 gcc test.cpp 时,我没有收到任何错误,这意味着我的 vsprint.c 和 gcc 已正确安装。

我在 stackoverflow 中遇到过类似的问题,但还没有找到解决方案。我使用 Ubuntu 32 位作为我的操作系统。有人可以指导我如何解决这个问题吗?

最佳答案

作为hvd

指出。我在错误的地方检查 stdarg.h。要修复它,必须将 stdarg.h 添加到我的项目中。从那里,交叉编译器 (xgcc) 能够编译程序。

关于c++ - XGCC stdarg.h 没有这样的文件或目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33766292/

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