리눅스 몽고DB 테스트를 위한 프로세스 컴파일시 에러 발생입니다..
안녕하세요
리눅스 CentOS에서 몽고DB 테스트를 위한 작업을하는데요
컴파일시 에러가발생하는데 아시는분 답변좀 부탁드립니다
에러내용 :
FingerprintDB_MongoImpl.cpp:72: error: cannot convert 'std::auto_ptr' to 'mongo::DBClientCursor*' in assignment
FingerprintDB_MongoImpl.cpp:74: warning: unused variable 'nLen'
FingerprintDB_MongoImpl.cpp: In member function 'virtual int CFingerprintDB_MongoImpl::insertFingerprint(TrackID_t, char*, char*, int, const char*, int)':
FingerprintDB_MongoImpl.cpp:168: warning: unused variable 'time_string'
FingerprintDB_MongoImpl.cpp: In member function 'virtual int CFingerprintDB_MongoImpl::getFingerprint(TrackID_t, void**, int*, int)':
FingerprintDB_MongoImpl.cpp:227: error: conversion from 'std::auto_ptr' to non-scalar type 'std::unique_ptr >' requested
FingerprintDB_MongoImpl.cpp: In member function 'virtual int CFingerprintDB_MongoImpl::getNumOfFingerprint(TrackID_t, int)':
FingerprintDB_MongoImpl.cpp:302: error: conversion from 'std::auto_ptr' to non-scalar type 'std::unique_ptr >' requested
FingerprintDB_MongoImpl.cpp: In member function 'virtual int CFingerprintDB_MongoImpl::getTrackInfo(TrackID_t, char*, std::string*, int)':
FingerprintDB_MongoImpl.cpp:332: error: conversion from 'std::auto_ptr' to non-scalar type 'std::unique_ptr >' requested
FingerprintDB_MongoImpl.cpp: In member function 'virtual int CFingerprintDB_MongoImpl::getTracksInContent(char*, TrackID_t**, int*, int)':
FingerprintDB_MongoImpl.cpp:371: error: conversion from 'std::auto_ptr' to non-scalar type 'std::unique_ptr >' requested
FingerprintDB_MongoImpl.cpp:376: warning: unused variable 'buf'
FingerprintDB_MongoImpl.cpp: In member function 'virtual int64_t CFingerprintDB_MongoImpl::getTotalFingerprintSize(int)':
FingerprintDB_MongoImpl.cpp:409: error: conversion from 'std::auto_ptr' to non-scalar type 'std::unique_ptr >' requested
In file included from /usr/local/mongodb/include/mongo/db/jsobj.h:41,
from /usr/local/mongodb/include/mongo/client/dbclientinterface.h:25,
from /usr/local/mongodb/include/mongo/client/connpool.h:23,
from /usr/local/mongodb/include/mongo/client/dbclient.h:32,
from MongoConn.h:10,
from FingerprintDB_MongoImpl.h:4,
from FingerprintDB_MongoImpl.cpp:8:
/usr/local/mongodb/include/mongo/db/../bson/bson-inl.h: In member function 'mongo::BSONObjBuilder& mongo::BSONObjBuilderValueStream::operator<<(T) [with T = long int]':
FingerprintDB_MongoImpl.cpp:483: instantiated from here
/usr/local/mongodb/include/mongo/db/../bson/bson-inl.h:341: error: call of overloaded 'append(mongo::StringData&, long int&)' is ambiguous
/usr/local/mongodb/include/mongo/db/../bson/bsonobjbuilder.h:169: note: candidates are: mongo::BSONObjBuilder& mongo::BSONObjBuilder::append(const mongo::StringData&, bool)
/usr/local/mongodb/include/mongo/db/../bson/bsonobjbuilder.h:177: note: virtual mongo::BSONObjBuilder& mongo::BSONObjBuilder::append(const mongo::StringData&, int)
/usr/local/mongodb/include/mongo/db/../bson/bsonobjbuilder.h:185: note: mongo::BSONObjBuilder& mongo::BSONObjBuilder::append(const mongo::StringData&, unsigned int)
/usr/local/mongodb/include/mongo/db/../bson/bsonobjbuilder.h:190: note: virtual mongo::BSONObjBuilder& mongo::BSONObjBuilder::append(const mongo::StringData&, long long int)
/usr/local/mongodb/include/mongo/db/../bson/bsonobjbuilder.h:246: note: virtual mongo::BSONObjBuilder& mongo::BSONObjBuilder::append(const mongo::StringData&, double)
/usr/local/mongodb/include/mongo/db/../bson/bsonobjbuilder.h:326: note: mongo::BSONObjBuilder& mongo::BSONObjBuilder::append(const mongo::StringData&, mongo::Date_t)
/usr/local/mongodb/include/mongo/db/../bson/bsonobjbuilder.h:368: note: mongo::BSONObjBuilder& mongo::BSONObjBuilder::append(const mongo::StringData&, const char*)
/usr/local/mongodb/include/mongo/db/../bson/bsonobjbuilder.h:372: note: mongo::BSONObjBuilder& mongo::BSONObjBuilder::append(const mongo::StringData&, const std::string&)
/usr/local/mongodb/include/mongo/db/../bson/bsonobjbuilder.h:376: note: mongo::BSONObjBuilder& mongo::BSONObjBuilder::append(const mongo::StringData&, const mongo::StringData&)
/usr/local/mongodb/include/mongo/db/../bson/bson_db.h:45: note: mongo::BSONObjBuilder& mongo::BSONObjBuilder::append(const mongo::StringData&, mongo::OpTime)
소스 :
std::unique_ptr cursor = m_spConnection->query(m_szDBName+"."+"content_info", condition, 1, 0, &columns,0,0);
unique_ptr 사용한 부분에서 에러가 발생하였구요
append() 함수는 오버로드의 호출이 모호 하다는데 호출하는 부분 전부 주석으로 막아도
에러가 발생하네요..
컴파일시 라이브러리 -lboost_filesystem -l/usr/local/mongodb/lib/libmongoclient.a
요로케랑 -I/usr/local/mongodb/include 몽고DB 헤더파일 패스만 물고 하는데요
혹시 뭔가를 더 해줘야 하나요?
댓글 달기