Good, progress! Thanks so much! Now I am where I was with plan A's boost building. First, here are my exact mods to configuration:
Using Debug/x64 via configuration error.
Properties: Configuration Properties->vc++ Directories->Include Directories add:
c:\mongodb
c:\boost
Properties: Configuration Properties->Linker->General->Additional Library Directories add:
c:\boost\lib
c:\mango (the location of mongoclient.lib)
Properties: Configuration Properties-> C/C++->Code Generation select:
/MDd
Properties: Configuration Properties --> C/C++ -> Preprocessor->Precprocessor Definitions add:
_CRT_SECURE_NO_WARNINGS
Properties: Configuration Properties->Linker->Input->Additional Dependencies add:
ws2_32.lib
Here is my simple source:
#include "StdAfx.h"
#include <iostream>
#include "client/dbclient.h"
using namespace mongo;
void run() {
DBClientConnection c;
c.connect("localhost");
}
int main() {
try {
run();
cout << "connected ok" << endl;
} catch( DBException &e ) {
cout << "caught " << e.what() << endl;
}
return 0;
}
I get many of these:
1>connectMongo.obj : error LNK2001: unresolved external symbol "protected: static struct mongo::AtomicUInt mongo::DBClientConnection::_numConnections" (?_numConnections@DBClientConnection@mongo@@1UAtomicUInt@2@A)
1>connectMongo.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl mongo::DBClientBase::insert(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::vector<class mongo::BSONObj,class std::allocator<class mongo::BSONObj> > const &,int)" (?insert@DBClientBase@mongo@@UEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBV?$vector@VBSONObj@mongo@@V?$allocator@VBSONObj@mongo@@@std@@@4@H@Z)
1>connectMongo.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl mongo::DBClientBase::insert(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class mongo::BSONObj,int)" (?insert@DBClientBase@mongo@@UEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@VBSONObj@2@H@Z)
1>connectMongo.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl mongo::DBClientBase::remove(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class mongo::Query,bool)" (?remove@DBClientBase@mongo@@UEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@VQuery@2@_N@Z)
1>connectMongo.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl mongo::DBClientBase::update(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class mongo::Query,class mongo::BSONObj,bool,bool)" (?update@DBClientBase@mongo@@UEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@VQuery@2@VBSONObj@2@_N3@Z)
1>connectMongo.obj : error LNK2001: unresolved external symbol "public: virtual class mongo::BSONObj __cdecl mongo::DBClientInterface::findOne(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class mongo::Query const &,class mongo::BSONObj const *,int)" (?findOne@DBClientInterface@mongo@@UEAA?AVBSONObj@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBVQuery@2@PEBV32@H@Z)
1>connectMongo.obj : error LNK2001: unresolved external symbol "public: virtual class std::auto_ptr<class mongo::DBClientCursor> __cdecl mongo::DBClientBase::getMore(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,__int64,int,int)" (?getMore@DBClientBase@mongo@@UEAA?AV?$auto_ptr@VDBClientCursor@mongo@@@std@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@4@_JHH@Z)
...
Is it not finding my mongoclient.lib?
Where in the properties do I tell it to ignore specific errors?
Thanks Tad. I have never lost faith that I can do this. :)
Mark