交叉编译1
来源:互联网 发布:linux matlab 13b 编辑:程序博客网 时间:2024/06/05 02:22
交叉编译:
arm-linux-gcc包解压至/usr/local
gedit etc/profile,添加pathnum 路径 arm-linux-gcc
对源代码进行宿主机编译验证:gcc main.c -o main
file main
改变指令:arm-linux-gcc main.c -o main
建立源代码包和存放结果的文件夹,一般建立在usr下
hello.c
int main()
{
mysay("hello");
}
helle.h
#ifdefine _hello_h
#defne _hello_h
#ifdefine _cplusplus
extern "C"
{
#endifvoid mysay(const char *s);#ifdefine _cplusplus
}
#endif
arm-linux-gcc hello.c -shared -o libhello.so /生产动态库文件
file lib.so
main.c
#include<hello.h>
int main()
{
mysay("1");
}
arm-linux-gcc main.c -o main -l/usr/arm/include -/usr/arm/lib -lsay ;链接动态库.so,
file main
arm-linux-readelf main -d(引用多少库,还可以-s,表示引用多少个符号)
0 0
- 1、交叉编译zlib
- 交叉编译1
- 交叉编译资料1
- freetype-1.3.1 交叉编译
- 交叉编译 BusyBox 1.15.1
- 交叉编译flac-1.2.1
- jrtplib 3.9.1交叉编译
- 交叉编译
- 交叉编译
- 交叉编译
- 交叉编译
- 交叉编译
- 交叉编译
- 交叉编译
- 交叉编译
- 交叉编译
- 交叉编译
- 交叉编译
- phpMyAdmin 安装教程全攻略
- LCD 调屏几种现象及原因
- QTBUG
- VS2003 +MFC fatal error LNK1201: 写入程序数据库“.pdb”时出错
- IOS修改设备用户代理UserAgent
- 交叉编译1
- 配置maven使用nexus
- 黑马程序员 java笔记之异常
- [总结]RTMP流媒体技术零基础学习方法
- 《写给大家看的设计书(第3版)》
- [Jekyll] 添加评论插件
- Android 系统通知栏demo
- 交叉编译2
- 解决win8建工程中添加文件崩溃的问题。