Linux GCC make文件的写法1
所需文件hello.c, main.c, hello.h, Makefile,在同一个目录下
hello.c:
#include <stdio.h>
void hello(char name[])
{
printf("Hello %s!\n", name);
}
main.c:
#include "stdio.h"
#include "hello.h"
// The second
int main()
{
hello("GCC");
printf("Haha Linux Ubuntu!\n");
return 0;
}
hello.h:
void hello(char name[]);
Makefile(之所以用大写,因为make可以识别Makefile和makefile,用大写可以鲜明一些):
# String declaration
objects = main.o hello.o
# Command
app : $(objects)
cc -o app main.o hello.o
main.o : main.c hello.h
cc -c main.c
hello.o : hello.c stdio.h
cc -c hello.c
# Search paths
vpath %.h /usr/include
# Clean the intermediate files
.PHONY : clean
clean :
rm app $(objects)
相关文档:
在前面的准备工作完成之后,先实验一下,谈不上真正的移植 ,因为代码都没有改的。
首先修改顶层的Makefile,修改ARCH,CROSS_COMPLIE变量。
#ARCH ?= $(SUBARCH)
ARCH ?= arm
CROSS_COMPILE ?= arm-linux-
执行make smd ......
什么时候需要创建线程池呢?简单的说,如果一个应用需要频繁的创建和销毁线程,而任务执行的时间又非常短,这样线程创建和销毁的带来的开销就不容忽视,这时也是线程池该出场的机会了。如果线程创建和销毁时间相比任务执行时间可以忽略不计,则没有必要使用线程池了。
下面是 ......
首先在Linux系统上安装samba
然后启动Windows虚拟机,在资源管理器中将samba的地址(例如//192.168.1.10/share)映射为一个虚拟盘符Z
最后启动SourceInsight,在Z盘上建立工程,并导入文件。
注意:以后每次使用SourceInsight之前先要连接samba服务器,比如说打开盘符Z。 ......
Linux下软件的安装与卸载
一、二进制分发软件包的安装与卸载
Linux软件的二进制分发是指事先已经编译好二进制形式的软件包的发布形式,其优点是安装使用容易,缺点则是缺乏灵活性,如果该软件包是为特定的硬件/操作系统平台编译的,那它就不能在另外的平台或环境下正确执行。
1、*.rpm形式的二进制软件包
安装:rpm ......