[CXX-944] mongocxx::database::stats() causes error LNK2019: unresolved external symbol Created: 21/Jun/16  Updated: 11/Sep/19  Resolved: 22/Jun/16

Status: Closed
Project: C++ Driver
Component/s: Implementation
Affects Version/s: 3.0.1
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: George Thompson Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 10
MS VS 2015
MongoDB 3.3.5
MongoDB C++11 Driver 3.0.1


Issue Links:
Duplicate
duplicates CXX-934 Remove database::stats() Closed

 Description   

bsoncxx::document::value statistics = db.stats();

gives me this link error:

stats_and_info.obj : error LNK2019: unresolved external symbol "_declspec(dllimport) public: class bsoncxx::v_noabi::document::value __cdecl mongocxx::v_noabi::database::stats(void)" (imp?stats@database@v_noabi@mongocxx@@QEAA?AVvalue@document@2bsoncxx@@XZ) referenced in function "void __cdecl T4Stats::PrintStatisticsForOneApplication(class T4Application const &)" (?PrintStatisticsForOneApplication@T4Stats@@YAXAEBVT4Application@@@Z)

This is the only error I get in a complex compile involving many thousands of lines of mongoDB C++11 code (I'm upgrading from 2.3 to 3.3.5). I am compiling with /Gd (__cdecl calling convention) even though the examples used /Gv which wrecked havoc with my use of Boost 1.60. Taking out this line, the solution compiles and links fine.



 Comments   
Comment by Andrew Morrow (Inactive) [ 22/Jun/16 ]

HI therefore - Thanks for reporting this, we believe it is a duplicate of CXX-934. Please follow that issue for updates.

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