在Windows下編譯mongo-c-driver 1.3.x 在Windows下編譯mongo-c-driver 1.3.x 1.安裝 MSYS2https://sourceforge.net/projects/msys2/2.如果是32位系統或編譯32位程式,運行 mingw32_shell.b ...
在Windows下編譯mongo-c-driver 1.3.x
在Windows下編譯mongo-c-driver 1.3.x
1.安裝 MSYS2
https://sourceforge.net/projects/msys2/
2.如果是32位系統或編譯32位程式,運行
mingw32_shell.bat
64位運行
mingw64_shell.bat
2.1編譯64位,安裝 MinGW64
pacman -S mingw64/mingw-w64-x86_64-gcc
pacman -S mingw64/mingw-w64-x86_64-libtool
2.2編譯32位,安裝MinGW32
pacman -S mingw32/mingw-w64-i686-gcc
pacman -S mingw32/mingw-w64-i686-libtool
3.
查找最新版automake
pacman -Ss automake
安裝最新版automake
pacman -S msys/automake1.15
安裝autoconf
pacman -S msys/autoconf
安裝automake-wrapper
pacman -S msys/automake-wrapper
msys/make
4.下載mongo-c-driver
mongo-c-driver最新版
https://github.com/mongodb/mongo-c-driver/releases
3.下載libson
libson最新版
https://github.com/mongodb/libbson/releases
解壓縮到mongo-c-driver/src/libbson目錄下
6.掛載mongo-c-driver目錄
umount -U /tmp
mount "mongo-c-driver展開目錄" /tmp
7.編譯mongo-c-driver
cd /tmp
./autogen.sh --with-libbson=bundled
make
搜索dll文件
這裡是我編譯好的 mongo-c-driver 1.3.5的windows 32位,64位DLL程式
http://files.cnblogs.com/files/hezihang/mongo-c-driver-1.3.5.dll.7z