ChinaUnix.net
相关文章推荐:

makefile用法

本人初学makefile,在练习过程遇到错误特来请教。 在/temp/c001的文件夹中有如下文件: 1、main.c #include "stdio.h" int main(){printf("hello,world!\n");} 2、makefile hello:main.c gcc -c mainc -o hello 在执行$make命令后显示错误信息:missing separator. 请问如何修改makefile文件?非常感谢。 本人的email:sxz88888@sohu.com

by sxz88888 - C/C++ - 2003-08-18 19:03:45 阅读(1531) 回复(1)

相关讨论

189 $(RECURSIVE_TARGETS): 190 @set fnord $$MAKEFLAGS; amf=$$2; \ 191 dot_seen=no; \ 192 target=`echo $@ | sed s/-recursive//`; \ 193 list='$(SUBDIRS)'; for subdir in $$list; do \ 194 echo "Making $$target in $$subdir"; \ 195 if test "$$subdir" = "."; then \ 196 dot_seen=yes; \ 197 local_targ...

by bierdaci - Shell - 2005-05-25 10:49:46 阅读(1119) 回复(0)

大家好,我是个高中生,高中1年纪。 最近在学习linux下的编程。 // 文件main.c #include #include "hello.h" int main() { str_printf("hello"); return 0; } // hello.h #ifndef HELLO_H_ #define HELLO_H_ void str_printf(const char *str); #endif // hello.c #include "hello.h" void str_printf(const char *str) { printf("hello.c:%s\n", str); } 请问makefile文件该怎么写?

by 写自己的操作系 - C/C++ - 2009-07-27 17:15:17 阅读(2603) 回复(13)

test.h #ifndef _TEST_H_ #define _TEST_H_ void print(); #endif test.c #include #include "test.h" void print() { printf("hello,world\n"); } main.c #include "test.h" int main() { print(); return 0; } makefile: mycpp: main.o test.o gcc -o mycpp main.o test.o main.o: main.c test.h gcc -c main.c test.o: test.c gcc -c test.c makefile...

by hr_it - C/C++ - 2008-09-17 00:10:10 阅读(3890) 回复(11)

这是我写的一个makefile VPATH=../lib:../include:../bin lib = ../lib/ bin = ../bin/ objects=bank.o adminlogin.o mainmenu.o execute.o deposit.o withdraw.o query.o \ write.o read.o listall.o cancelaccount.o establishaccount.o bank : $(objects) gcc $(objects) -o $(bin)bank bank.o : bank.c includeofbank.h includeofstruct.h gcc -c bank.c -o $(lib)bank.o mainmenu.o : mainmen...

by wangxiaoguang - C/C++ - 2008-08-06 12:52:02 阅读(2002) 回复(10)

本人明天就要交程序 但是突然发现要求要makefile 但我对这个根本不太了解 我有5个目录,as.tgs.client.kdc 和sever_v 每个目录下基本都有main.cpp和tea.hpp等文件 请问如何构造makefile? 应该是在主目录下构造一个makefile,然后在5个目录下分别构造5个makefile, 但是该怎么写了? 更大的问题是,我的程序是在LINUX下编译通过 但是放到SUN的UNIX下编译无法通过 如果是在Solaris上编译,因该把相应的头文件包含进去,如:“sys /...

by babobo - Shell - 2005-09-19 10:39:02 阅读(1115) 回复(1)

下了个java1.4源代码包,怎样执行make,我的操作系统是SCO UNIX

by zxllxz - Java - 2005-09-04 15:19:38 阅读(809) 回复(0)

为什么要加上-I . -g -Wall -ansi呀? 用gcc -c main.c 不就好了吗? :em14:

by qiqixiao - Linux论坛 - 2004-10-08 15:03:12 阅读(568) 回复(1)

freemem:freemem.c cc freemem.c -o freemem

by deng_save_file - Linux论坛 - 2004-07-08 07:36:36 阅读(461) 回复(0)

下面这个命令不懂,哪位高手拔刀相助: gcc -I . -g -Wall -ansi -c main.c 红色部分请指教! :roll:

by qiqixiao - Shell - 2004-10-09 09:09:26 阅读(863) 回复(1)

下面这个命令不懂,哪位高手拔刀相助: gcc -I . -g -Wall -ansi -c main.c 红色部分请指教! :em06:

by qiqixiao - 软件配置管理 - 2007-10-19 14:58:54 阅读(7248) 回复(11)