
编译
文章平均质量分 74
sxtobj
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
gcc -fPIC选项
使用 -fPIC 选项,会生成 PIC 代码。.so 要求为 PIC,以达到动态链接的目的,否则,无法实现动态链接。 non-PIC 与 PIC 代码的区别主要在于 access global data, jump label 的不同。 比如一条 access global data 的指令, non-PIC 的形势是:ld r3, var1 PIC 的形式则是:ld r3, va转载 2012-09-04 16:45:00 · 407 阅读 · 0 评论 -
ar选项解释(转载)
ar选项解释(转载) 1. 经常用法: ar -t libname.a //显示所有对象文件(.o文件)的列表.例: # ar t libtest.a libtest1.o libtest2.o ar -rv libname.a objfile1.o objfile2.o ... objfilen.o //把objfile1.o--objfilen.o打包成一个库文件转载 2012-09-04 16:40:31 · 793 阅读 · 0 评论 -
makefile
概述 —— 什么是makefile?或许很多Winodws的程序员都不知道这个东西,因为那些Windows的IDE都 为你做了这个工作,但我觉得要作一个好的和 professional的程序员,makefile还是要懂 。这就好像现在有这么多的HTML的编辑器,但如果你想成为一个专业人士,你还是要了解 HTML的标识的含义。特别在Unix下的软件编译,你就不能不自己写makefile转载 2012-10-08 12:54:33 · 880 阅读 · 0 评论 -
gcc编译常用简单实例
编译动态库和静态库的一些方法 以gcc为例: 1,build static library: #gcc -c *.c -E Preprocess only; do not compile, assemble or link -S Compile only; do not assemble or link -c Compile and assemble, but do n转载 2012-10-08 14:33:21 · 1681 阅读 · 0 评论 -
Aix上使用库文件和编写库文件。
Aix上使用库文件和编写库文件。 一直以来,被动态链接库,静态库,静态链接,动态链接,最近又听到运行时链接弄得一塌糊涂。天下文章一大抄,知道的大家都知道,静态链接是编译时链接,生成的文件大,动态链接是运行时链接,生成的文件小。不知道的大家都不知道,或者大家都以为自己知道...有时windows,有时linux,有时Aix,有时gcc,有时g++,有时cc,有时xlc,有时.so,有时.a,有时转载 2012-10-09 10:31:51 · 1937 阅读 · 0 评论 -
Oracle 10g及pro*c相关问题及解决方法
Oracle 10g及pro*c相关问题及解决方法 2010-09-26 10:47:35 分类: C/C++ 最近一直在进行ORACLE 10g和PRO*C的学习,其中遇到了不少的问题,现记录下来,以供以后参考。 一、常见问题 [注:我的linux版本是rhel 5,Oracle版本是10g] 1、在ORACLE 10g 安装准备的过程中:缺少libXp.so.6依转载 2013-09-05 15:47:36 · 1249 阅读 · 0 评论 -
C语言的一些特殊用法(#define)
宏 UNUSED_PARAM 的作用 该宏的定义如下: #ifndef UNUSED_PARAM #define UNUSED_PARAM(v) (void)(v) #endif 假如一个有返回值的函数 如调用时是没有使用它的返回值,编译器会给出一个警告 如果用void强制转换一下,则明确告诉编译器不使用返回值 也就是为了消除警转载 2016-07-14 10:42:25 · 783 阅读 · 0 评论 -
a label can only be part of a statement and a declaration is not a statement
【转载】a label can only be part of a statement and a declaration is not a statement GCC: error: a label can only be part of a statement and a declaration is not a statement switch(a)转载 2016-09-18 18:19:02 · 523 阅读 · 0 评论