【发布时间】:2013-12-24 05:57:45
【问题描述】:
我在编译代码 C xen 时遇到问题 :-(
我更改代码 C 程序并将 #include stdio 插入到程序中以打开/关闭文件。我在 xen 中使用命令“make”编译代码 C 但遇到错误:
../../../include/stdio.h:28:23 fatal error: features.h: No such file or directory
我插入命令“make” -I 但又重复错误!
如何在linux中编译代码C xen。
显示代码的一般部分已更改为我添加并导致错误,因为之前此代码没有错误,但我真的不知道为什么我不能添加 #include stdio.h为读取函数 fputc 和...?!
#include <stdio.h> // i add
#include <xen/config.h>
#include <xen/init.h>
#include <xen/lib.h>
#include <xen/sched.h>
#include <xen/domain.h>
#include <xen/delay.h>
#include <xen/event.h>
#include <xen/time.h>
#include <xen/perfc.h>
#include <xen/sched-if.h>
#include <xen/softirq.h>
#include <asm/atomic.h>
#include <xen/errno.h>
#include <xen/keyhandler.h>
struct csched_dom *sdom;
xc_shadow_op_stats_t stats;
FILE *out;
if(iter>=2) {
out = fopen("/test.dat", "w");
fputc(sdom->weight , out);
fclose(out);
}
else
{
sdom->weight = CSCHED_DEFAULT_WEIGHT;
out = fopen("/test.txt", "w");
fputc(sdom->weight , out);
fclose(out);
}
【问题讨论】:
-
如果您不显示您的代码,我们将无法帮助您。
-
而“显示您的代码”意味着将文本复制到您的问题中并正确格式化,而不是简单地发布屏幕截图或图像。
-
不要发文字终端截图,浪费资源。
-
Xen 是一个裸机管理程序。它位于您的硬件和操作系统之间。该级别没有文件,因此没有 stdio.h。
-
请提供您的完整代码。
标签: c++ c linux parallel-processing xen