I have three files to compile: main.c, func.c,  func.h

The steps:

1   main.c   to   main.o

2   func.c    to   func.o

3    link main.o func.o to main(file that can execute)

So, u need to run at least three commands without a Makefile.Then if u have 100 files to compile, how to do?

If u have a Makefile, u just need to type one word 'make'.

EASY

And I writed a Makefile:

test:

My first makefile to compile multiple C files的更多相关文章

  1. Linux Compile Multiple C++ Files

    Compile Two Files: $ CC -c Main.cc Sales_item.cc # by default generates a.exe # some compilers gener ...

  2. TN035: Using Multiple Resource Files and Header Files with Visual C++

    TN035: Using Multiple Resource Files and Header Files with Visual C++ This note describes how the Vi ...

  3. Multiple dex files define Lcom/google/gson/internal/Streams$AppendableWriter$CurrentWrite;

    开发中引入第三方 aar 时编译同过,运行时出现问题: Multiple dex files define Lcom/google/gson/internal/Streams$AppendableWr ...

  4. Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Lcom/lidroid/xutils/task/TaskHandler;

    Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files defi ...

  5. Android Studio:Multiple dex files define Landroid/support/annotation/AnimRes

    近期真的比較忙,一不小心博客又荒了两个月. 从今天起.决定重返csdn,多多纪录和分享. 先从一个近期被折磨的死去活来的问题. 由于升级了V4包,就一直报这个问题: com.android.dex.D ...

  6. Android Studio com.android.dex.DexException: Multiple dex files define(重复引用包),androiddefine

    Android Studio com.android.dex.DexException: Multiple dex files define(重复引用包),androiddefine 如果你用Andr ...

  7. Android 友盟和微信的包冲突:Multiple dex files define Lcom/tencent/a/a/a/a/a;

    最近App中有个需求是添加微信支付,就在微信技术官网 http://open.weixin.qq.com,查看一下文档,然后下载SDk,Demo.把SDK集成进项目. 照着微信的文档,把jar包和进来 ...

  8. 解决com.android.dex.DexException: Multiple dex files define Lcom/google/gson/JsonSerializer;

    我在开发Windows Azure的Mobile Service(隔天补上创建过程)的安卓客户端时,报出了com.android.dex.DexException: Multiple dex file ...

  9. Multiple dex files define Lokhttp3/internal/wsWebSocketProtocol

    Multiple dex files define Lokhttp3/internal/wsWebSocketProtocol 老套路,先晒图 图一:如题,在编译打包时遇到了如上错误,很明显这是一个依 ...

随机推荐

  1. MSP430FR2系列单片机破解芯片解密多少钱?

    MSP430FR2系列单片机破解芯片解密 MSP430FR2xx系列单片机芯片解密型号: MSP430FR2533.MSP430FR2110.MSP430FR2310.MSP430FR2311.MSP ...

  2. ASP.NET 一句代码实现批量数据绑定

    摘要:对于一个以数据处理为主的应用中的UI层,我们往往需要编写相当多的代码去实现数据绑定.如果界面上的控件和作为数据源的实体类型之间存储某种约定的映射关系,我们就可以实现批量的数据绑定,作者开发了的插 ...

  3. PTAM 编译安装 on MAC(mavericks)

    最近有需要研究PTAM,所以需要在我的MAC上编译安装,整个过程让人非常崩溃各种问题陷阱.现在整理一下编译过程.我已经成功在MAC上编译.那么接下来我会详细讲解整个过程: 注意: 部分链接可能需要FQ ...

  4. 【NuGet】搭建自己团队或公司的NuGet

    昨天接到领导安排,要搭建自己的NuGet,归结原因是自己前段时间在NuGet中安装mongoDb driver时,发现访问不了,无奈领导找的运维解决,也是此次任务的“导火索”……,好了,还是干活吧. ...

  5. php js数组问题

    <script type="text/javascript"> var a = new Array(); a = "a"; a = "b& ...

  6. 二分 题目 压缩打包 Special Judge? 不不不 当然不是

    http://noi.openjudge.cn/ch0111/ No 题目 分数 01 查找最接近的元素 10 3176 02 二分法求函数的零点 10 2181 03 矩形分割 10 1420 04 ...

  7. bzoj1001最小割

    听说最大流过不去??? dinic果然神了,1000,000的点都能过(主要是比较稀疏) #include <cstdio> #define INF 9223372036854775807 ...

  8. Nonblocking I/O and select()

    This sample program illustrates a server application that uses nonblocking and the select() API. Soc ...

  9. C#输出文本树形层次,前或者后自定义空格位数

    Indent String with Spaces This example shows how to indent strings using method for padding in C#. T ...

  10. 深入浅出 妙用Javascript中apply、call、bind

    apply.call 在 javascript 中,call 和 apply 都是为了改变某个函数运行时的上下文(context)而存在的,换句话说,就是为了改变函数体内部 this 的指向. Jav ...