"bsoncxx::document is ambiguous." error while using C++ Mongodb driver 3.7.1

Hello @Fan_Rex,

Welcome to the MongoDB Community.

The error message “bsoncxx::document is ambiguous” typically occurs in the compiler when there is a naming conflict in the code. In this case, it appears that there may be a conflict between different definitions or declarations of the bsoncxx::document type.

I recommend checking for namespace conflicts in your code.

Here are a couple of links to similar discussions that might be helpful for you:

Best,
Kushagra