libpq 与 fe-misc.c

简介:
经过一番验证,对 libpq 的编译过程有了进一步的了解。

src/interfaces/libpq 目录下,有很多的 c 源文件。
如:fe-misc.c ,fe-print.c 等等。

那么这些文件和最终编译好的libpq.so 有何关系呢?
从源文件目录下的几个文件来看:

src/interfaces/libpq/Makefile中,有:
...    OBJS=....  fe-misc.o ...

src/interfaces/libpq/nls.mk中,有:
...    GETTEXT_FILES=.... fe-misc.c

因此,做了如下的实验:

把fe-misc.c 文件改名 fe-gao.c
上述 两个 fe-misc 的名字 分别变成: fe-gao.o  和  fe-gao.c

重新编译,运行。没有任何问题。

从 libpq-int.h 中可以看到,凡是涉及到 fe-misc.c 的函数调用,都是在此文件中
声明外部函数:
extern ...

可以这样认为:
编译链接 libpq.so文件的时候,是在当前目录下寻找 那些 Makefile中声明的.o文件,
来发现调用关系,链接成 libpq.so。








本文转自健哥的数据花园博客园博客,原文链接:http://www.cnblogs.com/gaojian/archive/2012/07/11/2586045.html,如需转载请自行联系原作者
目录
相关文章
|
9月前
|
Linux Windows
uboot配置时ln: failed to create symbolic link ‘asm’
uboot配置时ln: failed to create symbolic link ‘asm’
115 2
|
6月前
|
关系型数据库 MySQL Linux
【Linux环境】centos安装mysql5.7.26报 ./mysqld: error while loading shared libraries: libaio.so.1: cannot op
【Linux环境】centos安装mysql5.7.26报 ./mysqld: error while loading shared libraries: libaio.so.1: cannot op
116 0
|
并行计算
解决Could not load dynamic library ‘libcudart.so.11.0‘; dlerror: libcudart.so.11.0
解决Could not load dynamic library ‘libcudart.so.11.0‘; dlerror: libcudart.so.11.0
3023 0
|
1月前
|
网络协议 Unix
`AF_UNIX` 和 `AF_LOCAL`
`AF_UNIX` 和 `AF_LOCAL`
23 1
|
11月前
|
机器学习/深度学习 人工智能
CF788A Functions again
CF788A Functions again
44 0
bin/arm-linux-androideabi-nm: libtinfo.so.5: cannot open shared object file: No such file or directo
bin/arm-linux-androideabi-nm: libtinfo.so.5: cannot open shared object file: No such file or directo
78 0
|
Linux
LINUX编译OpenJDK8:cc1plus: all warnings being treated as errors
LINUX编译OpenJDK8:cc1plus: all warnings being treated as errors
144 0
|
编解码 Ubuntu Linux
Linux FrameBuffer(三)- struct fb_fix_screeninfo 和 struct fb_var_screeninfo 详解
Linux FrameBuffer(三)- struct fb_fix_screeninfo 和 struct fb_var_screeninfo 详解
309 0
|
人工智能 大数据
Transaction Check Error:file /usr/libexec/getconf/default conflicts between attempted installs of gcc-6.4.1-1.fc25.i686 and gcc-6.4.1-1.fc25.x86_64
欢迎关注大数据和人工智能技术文章发布的微信公众号:清研学堂,在这里你可以学到夜白(作者笔名)精心整理的笔记,让我们每天进步一点点,让优秀成为一种习惯! 今天在我的ubuntu系统上使用yum来安装软件时出错了错误:Transaction Check Error:file /usr/libexec/...
1416 0

热门文章

最新文章