MinGW編譯Mongo-CXX-Driver



8. mongo-cxx-driverc++

pacman -S mingw-w64-x86_64-cyrus-saslui

pacman -S mingw-w64-x86_64-extra-cmake-modulesc++11

export OS_BUILD=64module


cd mongo-c-driver-1.14.0/
mkdir cmake-build
cd cmake-buildfile


cmake -G "MSYS Makefiles" -DCMAKE_CXX_FLAGS="-D__USE_MINGW_ANSI_STDIO=1" -DCMAKE_INSTALL_PREFIX=/mingw64/local -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_MONGOC=ON -DENABLE_MAN_PAGES=OFF -DENABLE_HTML_DOCS=OFF ..gc


vi D:/GISSoft/gdal/mongo-c-driver-1.14.0/src/libbson/src/bson/bson-compat.hdi

#define __USE_MINGW_ANSI_STDIO 1cmake

make
make installvi


----------------------------------------------------------------------------------------make

cd mongo-cxx-driver-r3.4.0
cd build

export "CPPFLAGS=-I/mingw64/local/include"
export "LDFLAGS=-L/mingw64/local/lib"
export "PKG_CONFIG_PATH=-L/mingw64/local/lib/pkgconfig"


cmake -G "MSYS Makefiles" -DBSONCXX_POLY_USE_MNMLSTC=1 -DCMAKE_INSTALL_PREFIX=/mingw64/local -DCMAKE_CXX_FLAGS="-std=c++11" -DCMAKE_PREFIX_PATH=/mingw64/local ..

make EP_mnmlstc_core

make

make install

相關文章
相關標籤/搜索