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. SQL SERVER 2005修改数据库名称,包括物理文件名和逻辑名称

    SQL SERVER 2005修改数据库名称,包括物理文件名和逻辑名称   原来数据库名称为 aa,物理文件名称为 aa.mdf 和 aa_log.ldf:   需要修改数据库名称为 bb,物理文件名 ...

  2. Java并发编程基础--基本线程方法详解

    什么是线程 线程是操作系统调度的最小单位,一个进程中可以有多个线程,这些线程可以各自的计数器,栈,局部变量,并且能够访问共享的内存变量.多线程的优势是可以提高响应时间和吞吐量. 使用多线程 一个进程正 ...

  3. css3clock.js - 一个用CSS3与纯js实现的简单时钟

    前言 项目代码明细可以查看我Github上的源码:https://github.com/nelsonkuang/css3clock.js 实现思路 主要是用CSS3控制时针.分针和秒针旋转:时针每12 ...

  4. dedecms搜索框写法

    <div class="bg_search"> <form id="forms" name="formsearch" ac ...

  5. ssh自动输入密码脚本 切换目录脚本

    利用expect的,首先查看expect,命令:which expect #!/usr/bin/expect -f spawn ssh 用户名@ip地址 expect "assword:&q ...

  6. 【HDU】4773 Problem of Apollonius

    题意 给定相离的两个圆(圆心坐标以及半径)以及圆外的一个定点\(P\),求出过点\(P\)的且与已知的两个圆外切的所有圆(输出总数+圆心.半径). 分析 如果强行解方程,反正我是不会. 本题用到新姿势 ...

  7. Linux Shell 截取字符串

    Linux Shell 截取字符串 shell中截取字符串的方法很多 ${var#*/} ${var##*/} ${var%/*} ${var%%/*} ${var:start:len} ${var: ...

  8. 无法连接虚拟设别 ide1:0.

    安装虚拟机时出现提示:无法连接虚拟设备 ide1:0,因为主机上没有相应的设备.您要在每次开启此虚拟机时都尝试连接此虚拟设备吗? ide1:0一般是虚拟机的光驱,配置选项是“使用物理驱动器”,而宿主机 ...

  9. 让/etc/profile文件修改后立即生效

    方法1: 让/etc/profile文件修改后立即生效 ,可以使用如下命令: # .  /etc/profile 注意: . 和 /etc/profile 有空格 方法2: 让/etc/profile ...

  10. C#判断数组是否为空

    string[] array=new[] { "1", "2", "3", "4", "5" }; ...