Details
-
Bug
-
Resolution: Incomplete
-
Critical - P2
-
None
-
0.8.1
-
None
-
windows 7, Visual Studio 2010
Description
I was trying to build the driver on Windows 7 with scons build utility but I was not able to connect the database with the following lines of code.
mongo conn[1];
int status = mongo_client( conn, "127.0.0.1", 27017 );
if( status != MONGO_OK ) {
switch ( conn->err )
}
I have traced the error receive MONGO_SOCKET_ERROR by tracing conn->err. I have then initialized the socket on env.c file around line# 500 with adding some code. Now it works perfectly fine.
To build the driver, I have avoided the scons and used a visual studio 2010 project. I am providing the working visual studio project here together with the codes that I have added. I have also used Preprocessor directive MONGO_USE__INT64 and MONGO_ENV_STANDARD.
Please note that the after compilation the output files will be in Debug folder which are mongo_driver.lib and mongo_driver.dll
This is also mentionable that the same driver both works fine for OS X 10.6 and Linux 64.