use berkeleydb18.1.32 and example c

!!! NOTE !!!

  1. dont use 18.1.40 which is latest now[2023-08]

get start

cd build_unix
../dist/configure
make
sudo make install # or uninstall
# check installation PATH in
#/usr/local/BerkeleyDB.18.1

# preconfig: set get access to lib.so
echo \
"export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/BerkeleyDB.18.1/lib" \
>> $HOME/.bashrc \
&& source $HOME/.bashrc # other .zshrc maybe
# in vscode set include search path /usr/local/BerkeleyDB.18.1/include first 
# compile example in directory example/c
gcc ex_<what ever>.c -I/usr/local/BerkeleyDB.18.1/include -L/usr/local/BerkeleyDB.18.1/lib -ldb -pthread
# run ./a.out

fix u_int, u_long etc. errors

  1. define u_int unsigned int
  2. define u_long unsigned long

你可能感兴趣的:(build,things,from,source,code,c语言,开发语言)