[CXX-1606] 'mongocxx::cursor' could not be resolved Created: 04/Jul/18 Updated: 27/Oct/23 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: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
ubuntu 16.04 |
||
| Issue Links: |
|
||||||||
| Description |
|
Hi.
But at compilation errors: Method 'find' could not be resolved
|
| Comments |
| Comment by A. Jesse Jiryu Davis [ 27/Jul/18 ] | |||||||||||||||||||||||||||||||||||||||||
|
I tried compiling your code on an Ubuntu 16.04 machine and I was able to compile it without error. Here's my g++ and cmake versions:
I followed the installation instructions for the C Driver and C++ Driver: http://mongoc.org/libmongoc/current/installing.html These are the commands I ran:
Once I had installed the C and C++ Drivers and put your code into the following complete file:
I put this code into a file named foo.cpp and compiled it like this:
| |||||||||||||||||||||||||||||||||||||||||
| Comment by Black [X] [ 27/Jul/18 ] | |||||||||||||||||||||||||||||||||||||||||
|
-Please add -#include <mongocxx/cursor.hpp> Sorry! I did it, It does not help. | |||||||||||||||||||||||||||||||||||||||||
| Comment by A. Jesse Jiryu Davis [ 26/Jul/18 ] | |||||||||||||||||||||||||||||||||||||||||
|
Please add:
|