[CXX-1997] Unable to find libmongocxx.lib and libbsconcxx.lib AND member "bsoncxx::v_noabi::types::b_double::type_id" Created: 16/Apr/20  Updated: 27/Oct/23  Resolved: 26/Sep/23

Status: Closed
Project: C++ Driver
Component/s: Build
Affects Version/s: 3.4.1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Matin F Assignee: Adrian Dole
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

VS2015 x64 , Boost_1.69, Cmake 3.16.6, mongocxx 3.4.1 mongoc 1.16.2


Attachments: PNG File snip1.PNG     PNG File snip2.PNG    
Issue Links:
Related
is related to CXX-1789 Issues using C++ driver in Visual Stu... Closed

 Description   

Hi, I am trying to use mongoDB by visual studio 2015. I followed instruction till this point where i get 2 errors. 
1) member "bsoncxx::v_noabi::types::b_double::type_id" may not be initialized Project1 c:\mongo-cxx-driver-r3.4.1\include\bsoncxx\v_noabi\bsoncxx\types.hpp 86 .........
2) LNK1104 cannot open file 'libbsoncxx.lib' Project1 C:\Users\STEE - 28.02.2019\Desktop\Testing Project Files\Project1\Project1\LINK 1

I followed the instruction from http://mongocxx.org/mongocxx-v3/installation/ and https://github.com/rcsalvador/mongocxx-vs2015 but to no avail. It would appear that maybe i am missing libmongocxx.lib and libbsoncxx.lib ? Did i miss a step? 

For cxx component, this is the syntax I did for VS2015 developer cmd;

(1) config by  VS2015 developer cmd

cmake "-DCMAKE_BUILD_TYPE=Release" "-DBSONCXX_POLY_USE_BOOST=1" "-DCMAKE_PREFIX_PATH=C:\mongo-c-driver-1.16.2" "-DCMAKE_INSTALL_PREFIX=C:\mongo-cxx-r3.4.1" ..

(2) Build and install by VS2015 MSbuild cmd

msbuild.exe ALL_BUILD.vcxproj

msbuild.exe INSTALL.vcxproj 

(3) config by  VS2015 developer cmd

cmake -G “Visual Studio 14 2015” “-DCMAKE_BUILD_TYPE=Release” “-DCMAKE_INSTALL_PREFIX=C:\mongo-cxx-r3.4.1” “-DCMAKE_PREFIX_PATH=C:\mongo-c-driver-1.16.2” “-DBOOST_ROOT=C:\boost\boost_1_69_0“ ..

(4) Build and install by VS2015 MSbuild cmd

msbuild.exe ALL_BUILD.vcxproj

msbuild.exe INSTALL.vcxproj 

 

Please help. Thank you. 



 Comments   
Comment by Adrian Dole [ 26/Sep/23 ]

Cannot reproduce as of:

  • mongoc 1.24.4
  • mongocxx 3.8.0
  • Visual Studio 17

Example program successfully builds from Visual Studio.

Comment by Kevin Albertson [ 29/Aug/20 ]

Thank you for the report thisismatin@gmail.com. This may be related to CXX-1789, which lists other issues users have reported using the C++ driver in Visual Studio projects.

Generated at Wed Feb 07 22:04:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.