读书人

新手问。如何写makefile。刚学

发布时间: 2012-02-28 13:06:35 作者: rapoo

新手问。怎么写makefile。刚学
“helloworld”用Ubuntu虚拟机linux下写的makefile文件。需要几个程序啊。
一个如下程序不行么
#include <stio.h>
main()
{
printf("helloworld");
}
刚学不会用

[解决办法]
比如你的文件名为 test.c
gcc -o test.o test.c
test.bin: test.c include/*
gcc -o test.bin test.c


[解决办法]

探讨
“helloworld”用Ubuntu虚拟机linux下写的makefile文件。需要几个程序啊。
一个如下程序不行么
#include <stio.h>
main()
{
printf("helloworld");
}
刚学不会用

[解决办法]
探讨

引用:
“helloworld”用Ubuntu虚拟机linux下写的makefile文件。需要几个程序啊。
一个如下程序不行么
#include <stio.h>
main()
{
printf("helloworld");
}
刚学不会用


一般是有头文件和.c文件的,当然直接那样也是可以的。
C/C++ code


hello:hel……

读书人网 >UNIXLINUX

热点推荐