Berkeley DB: Building Shared Libraries for the GNU GCC compiler
ee,hash,hashing,transaction,transactions,locking,logging,access method,access me
Building Shared Libraries for the GNU GCC compiler
If you're using gcc and there's no better shared library example for your
architecture, the following shared library build procedure will probably
- Add the -fpic option to the CFLAGS value in the Makefile.
Rebuild all of your .o files. This will create a Berkeley DB
library that contains .o files with PIC code. To build the shared
library, then take the following steps in the library build directory:
% mkdir tmp
% cd tmp
% ar xv ../libdb.a
% gcc -shared -o libdb.so *.o
% mv libdb.so ..
% cd ..
% rm -rf tmp
Note, you may have to change the gcc line depending on the requirements
of your system.
The file libdb.so is your shared library.