如何安装适用于Mingw Linux编译环境的BerkeleyDB

How to install BerkeleyDB for Mingw Linux compile environment

本文关键字:编译 Linux 环境 BerkeleyDB Mingw 适用于 何安装 安装      更新时间:2023-10-16

我正试图使用Mingw在Linux上交叉编译应用程序,但遇到以下错误消息:

db.h:14:20: fatal error: db_cxx.h: No such file or directory

据我所知,这是由于Berkeley DB包含文件没有出现在Mingw包含树下造成的。

我的问题是:如何获取Berkeley DB源文件并将其安装在Mingw-include文件树下?

(我知道这是一个老问题,但人们可能仍在寻找解决方案)

运行Debian 7.6(喘息)时,我用命令dpkg -S /usr/include/db_cxx.h 检查了文件/usr/include/db_cxx.h

这给出了以下回应:

libdb5.1++-dev: /usr/include/db_cxx.h

然后问题中的错误消息可以通过以下方式修复:

sudo apt-get install libdb5.1++-dev

为了用mingw 4.9.2 32位构建db-4.8.30.NC,请尝试以下操作:

../dist/configure --disable-replication --enable-mingw --enable-cxx --prefix=/mingw
make
make install