【发布时间】:2011-05-05 09:50:35
【问题描述】:
在下面寻找编译我的程序的帮助。我得到一个“***停止。没有目标。”在编译器缓冲区中输入 limit.makefile 时出错。想法?
int main(int argc, char *argv[]) {
struct rlimit limit;
limit.rlim_cur = 60000;
limit.rlim_max = 60000;
if (setrlimit(RLIMIT_FSIZE, &limit) == -1){
perror("Error preventing core dump, errno=%d\n", errno);
exit(1);
}
else {
printf("The current core limit is %ll.\n", limit.rlim_cur);
printf("The core max limit is %ll.\n", limit.rlim_max);
exit(0);
}
if (getrlimit(RLIMIT_FSIZE, &limit) == -1){
printf("getlimit() failed with errno=%d\n", errno);
exit(1);
}
}
编译命令:make -k -f limit.makefile
这是我为编译器缓冲区键入的内容……但仍然出现错误。
生成文件:
CC = /usr/bin/gcc
CFLAGS = -g -Wall -std=c99 -O2 -arch x86_64
【问题讨论】:
-
你能编辑你的问题并把make limit.makefile放进去吗?
-
您的 makefile 不包含任何需要编译的文件?
-
limit.c 是我需要的程序。我在哪里添加?
标签: unix compiler-construction makefile system