日期:2014-05-16  浏览次数:20614 次

新手问。怎么写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……