[CXX-1605] 'mongocxx::cursor' could not be resolved Created: 04/Jul/18  Updated: 26/Jul/18  Resolved: 26/Jul/18

Status: Closed
Project: C++ Driver
Component/s: BSON, Release
Affects Version/s: 3.3.0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Black [X] Assignee: A. Jesse Jiryu Davis
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

ubuntu 16.04
Eclipse IDE for C/C++ Developers
c++11


Issue Links:
Duplicate
duplicates CXX-1606 'mongocxx::cursor' could not be resolved Closed

 Description   

Hi.
This code works(i.e. it run)

 

mongocxx::instance instance{}; // This should be done only once.
 mongocxx::uri uri("mongodb://192.168.1.1:27017");
 mongocxx::client client(uri);
 mongocxx::database db = client["test"];
 mongocxx::collection coll = db["counters"];
mongocxx::cursor cursor = coll.find({});
for(auto doc : cursor) {
 std::cout << bsoncxx::to_json(doc) << "\n";
 }

But at compilation errors:

Method 'find' could not be resolved
'mongocxx::cursor' could not be resolved
 
How to make that there were no errors?

-I/usr/local/include/libbson-1.0
-I/usr/local/include/libmongoc-1.0
-I/usr/local/include/mongocxx/v_noabi
-I/usr/local/include/bsoncxx/v_noabi
-lbsoncxx -lmongocxx
-L/usr/local/lib -Wl,-rpath=/usr/local/lib

 


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