Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-459

compile error caused by connpool.h

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • legacy-1.0.0-rc3
    • Build

    Description

      #include <mongo/client/connpool.h>

      g++ main.cpp -o main -lmongoclient -lboost_system -lboost_thread -lboost_filesystem -lboost_program_options -lboost_regex -std=c+
      +11 -g
      In file included from /usr/include/mongo/bson/bsonelement.h:25:0,
      from /usr/include/mongo/bson/bsonobj.h:28,
      from /usr/include/mongo/client/bulk_operation_builder.h:20,
      from /usr/include/mongo/client/dbclientinterface.h:29,
      from /usr/include/mongo/client/connpool.h:22,
      from main.cpp:2:
      /usr/include/mongo/bson/bsontypes.h: In function ‘int mongo::canonicalizeBSONType(mongo::BSONType)’:
      /usr/include/mongo/bson/bsontypes.h:148:21: error: ‘verify’ was not declared in this scope verify(0); ^In file included from /usr/include/mongo/bson/oid.h:23:0, from /usr/include/mongo/bson/bsonelement.h:26, from /usr/include/mongo/bson/bsonobj.h:28, from /usr/include/mongo/client/bulk_operation_builder.h:20, from /usr/include/mongo/client/dbclientinterface.h:29, from /usr/include/mongo/client/connpool.h:22, from main.cpp:2:/usr/include/mongo/bson/util/builder.h: In member function ‘void mongo::StringBuilderImpl<Allocator>::appendDoubleNice(double)’:/usr/include/mongo/bson/util/builder.h: In member function ‘void mongo::StringBuilderImpl<Allocator>::appendDoubleNice(double)’:/usr/include/mongo/bson/util/builder.h:335:28: error: there are no arguments to ‘verify’ that depend on a template parameter, so a declaration of ‘verifyst be available [-fpermissive] verify( z >= 0 ); ^ ^/usr/include/mongo/bson/util/builder.h:335:28: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is depcated)recated)/usr/include/mongo/bson/util/builder.h:336:33: error: there are no arguments to ‘verify’ that depend on a template parameter, so a declaration of ‘verifyst be available [-fpermissive] verify( z < maxSize );

      Attachments

        Activity

          People

            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            tianchaohaohan tianchaohaohan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: