How to build Mongo-c-driver for x86

101 views
Skip to first unread message

weicon

unread,
Nov 11, 2015, 5:50:00 AM11/11/15
to mongodb-user
I'm trying to build mongo-c-driver. Following the  official tutorial, I get four lib file for x64. 
mongoc-static-1.0.lib   mongoc-1.0.lib  bson-static-1.0.lib bson-1.0.lib
They work in a x64 program
However the build  fails if I set the platforms "win32", the four lib file are not suitable for win32 program.

The turorial steps is:


  1. cd mongo-c-driver-1.2.1
  2. cmake -G "Visual Studio 2010 Win64" "-DCMAKE_INSTALL_PREFIX=C:\mongo-c-driver" "-DBSON_ROOT_DIR=C:\mongo-c-driver"
  3. msbuild.exe ALL_BUILD.vcxproj
  4. msbuild.exe INSTALL.vcxproj
 After cmake,  I set the platforms from x64 into win32  in VS2010.

Does anyone have idea about it?


Mooki Moo

unread,
Nov 11, 2015, 7:00:48 AM11/11/15
to mongodb-user
When building your Win32 platform use a Native Win32 Visual Studio Command Line available from the Visual Studio Application Menu via the Start Button.

weicon

unread,
Nov 12, 2015, 1:07:21 AM11/12/15
to mongodb-user
Thank you! It works!
Reply all
Reply to author
Forward
0 new messages