[CDRIVER-1226] Update C++ instructions for C Driver, and consistently name a VS version in install guide Created: 07/May/16 Updated: 11/Sep/19 Resolved: 16/Jun/16 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | Build |
| Affects Version/s: | 1.3.5 |
| Fix Version/s: | 1.4.0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | George Thompson | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows 10 |
||
| Issue Links: |
|
||||||||||||
| Description |
|
It has been several years since I worked on mongoDB (Windows 7 64 bit SP1 & mongoDB 2.2.0) and was able to install the c++ driver as part of building mongodb from source. Apparently that has changed. I have built R3.3.5 from source. According to https://github.com/mongodb/mongo-cxx-driver/wiki/Quickstart-Guide-%28New-Driver%29 I need to first build the C driver and then the C++ driver. Following this documentation to install on Windows: https://github.com/mongodb/mongo-c-driver/blob/master/README.rst Downloaded zip and stored it in C:\mongo-c-driver-1.3.5 Per the README: cd mongo-c-driver-1.3.5 Returned this error: CMake Error: The source directory "C:/mongo-c-driver-1.3.5/src/libbson" does not appear to contain CMakeLists.txt. Which makes sense because src/libson is empty. CMakeLists.txt is in C:/mongo-c-driver-1.3.5 So I try running cmake in the mongo-c-driver-1.3.5 directory: C:\mongo-c-driver-1.3.5>cmake -DCMAKE_INSTALL_PREFIX=C:\usr -G "Visual Studio 12 Win64" . – Configuring incomplete, errors occurred! So any clues on how to install the C driver so I can get on to installing the C++ driver? Thanks. Tried posting to mongodb-user with no results. |
| Comments |
| Comment by Githook User [ 16/Jun/16 ] |
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: |
| Comment by Githook User [ 17/May/16 ] |
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: |
| Comment by A. Jesse Jiryu Davis [ 08/May/16 ] |
|
Good point, thanks for the correction. |
| Comment by George Thompson [ 08/May/16 ] |
|
Thank you so much for the help (and the patience). Sorry that I didn't get the difference between the tarball and the zip of the source. Everything appeared to go without error! FWIW, I believe there is an error in the instructions. https://api.mongodb.com/c/current/installing.html#building-windows It states in the section "Now let's do the same for the MongoDB C driver." cmake -G "Visual Studio 2012 Win64" "-DCMAKE_INSTALL_PREFIX=C:\mongo-c-driver" "-DBSON_ROOT_DIR=C:\mongo-c-driver" I believe it is meant to state: cmake -G "Visual Studio 10 Win64" "-DCMAKE_INSTALL_PREFIX=C:\mongo-c-driver" "-DBSON_ROOT_DIR=C:\mongo-c-driver" I.e., "10" and not "2012" to be consistent with the previous cmake -G generator. I used "12" in both cases as I am using VS 2013. And now on to install the C++ driver! |
| Comment by A. Jesse Jiryu Davis [ 07/May/16 ] |
|
Hi, sorry for the trouble. Please download a release tarball instead of a mere zip of the source: https://github.com/mongodb/mongo-c-driver/releases The release tarball has everything you need, including the contents of src/libbson. If you then follow the directions to build for Windows: https://api.mongodb.com/c/current/installing.html#building-windows That should work fine for you. Please reopen this ticket if you have further trouble. As followup, I'll make sure the C++ driver README is improved. |