I am unable to compile the Mongo client under vs2010 C++ using "scons
mongoclient.lib. I am attempting to follow the instructions given at
http://www.mongodb.org/display/DOCS/Building+with+Visual+Studio+2010.
I see very little help in the forums regarding building under vs2010.
Any suggestions as where to start to fix this problem would be
appreciated, as my C++ skills are minimal.
The resulting console output from scons is shown below:
------------------------------------
scons: Reading SConscript files ...
scons version: 2.0.1
python version: 2 6 4 'final' 0
found visual studio at D:\Program Files\DevTools\Microsoft Visual
Studio 10.0\VC\BIN
boost found at 'C:/Program Files/Boost/boost_1_44'
Windows SDK Root 'C:/Program Files/Microsoft SDKs/Windows/v7.0A'
Checking whether the C++ compiler works(cached) yes
Checking for C++ header file pcrecpp.h... (cached) yes
Checking for C++ header file boost/filesystem/operations.hpp...
(cached) yes
Checking for C library boost_system-mt... (cached) no
Checking for C library boost_system... (cached) no
Checking for C++ header file execinfo.h... (cached) no
Checking for C library pcap... (cached) no
Checking for C library wpcap... (cached) no
Assuming a 32 bit build is desired
Checking for C library js32d... (cached) yes
Checking for C header file js/jsapi.h... (cached) no
Checking for C header file jsapi.h... (cached) yes
Checking whether the C++ compiler works(cached) yes
Checking for C++ header file boost/filesystem/operations.hpp...
(cached) yes
Checking for C library boost_system-mt... (cached) no
Checking for C library boost_system... (cached) no
Checking for C++ header file execinfo.h... (cached) no
Checking for C library pcap... (cached) no
Checking for C library wpcap... (cached) no
Assuming a 32 bit build is desired
Checking for C library js32d... (cached) yes
Checking for C header file js/jsapi.h... (cached) no
Checking for C header file jsapi.h... (cached) yes
Checking for C library readline... (cached) no
*** notice: no readline library, mongo shell will not have nice
interactive line editing ***
scons: done reading SConscript files.
scons: Building targets ...
cl /Foutil\text.obj /c util\text.cpp /TP /nologo /EHsc /W3 /wd4355 /
wd4800 /wd4267 /wd4244 /Od /RTC1 /MDd /Z7 /TP /errorReport:none /
Fd"mongod.pdb" /D_SCONS /DMONGO_EXPOSE_MACROS /DOLDJS /D_UNICODE /
DUNICODE /DWIN32 /D_CONSOLE /D_CRT_SECURE_NO_WARNINGS /DHAVE_CONFIG_H /
DPCRE_STATIC /DSUPPORT_UCP /DSUPPORT_UTF8,PSAPI_VERSION=1 /D_DEBUG /
DNOEXECINFO /DXP_WIN /DOLDJS /I. /Ijs\src /IE:\VS2010\Projects\js\src
"/IC:\Program Files\Boost\boost_1_44" /Ipcre-7.4 "/IC:\Program Files
\Microsoft SDKs\Windows\v7.0A\Include" /IE:\VS2010\Projects\winpcap
\Include
text.cpp
util\text.cpp(96) : error C2665:
'boost::system::system_error::system_error' : none of the 7 overloads
could convert all the argument types
C:\Program Files\Boost\boost_1_44\boost/system/
system_error.hpp(30): could be
'boost::system::system_error::system_error(boost::system::error_code,const
std::string &)'
C:\Program Files\Boost\boost_1_44\boost/system/
system_error.hpp(33): or
'boost::system::system_error::system_error(boost::system::error_code,const
char *)'
C:\Program Files\Boost\boost_1_44\boost/system/
system_error.hpp(36): or
'boost::system::system_error::system_error(int,const
boost::system::error_category &)'
while trying to match the argument list '(DWORD, overloaded-
function)'
scons: building terminated because of errors.
---------------------
The line at util/text.cpp(96) in error is:
throw boost::system::system_error(
::GetLastError(), boost::system::system_category);
The referenced lines in boost/system/system_error.hpp(30, 33, 36 ...)
are:
public:
system_error( error_code ec )
: std::runtime_error(""), m_error_code(ec) {}
system_error( error_code ec, const std::string & what_arg )
: std::runtime_error(what_arg), m_error_code(ec) {}
system_error( error_code ec, const char* what_arg )
: std::runtime_error(what_arg), m_error_code(ec) {}
system_error( int ev, const error_category & ecat )
: std::runtime_error(""), m_error_code(ev,ecat) {}
system_error( int ev, const error_category & ecat,
const std::string & what_arg )
: std::runtime_error(what_arg), m_error_code(ev,ecat) {}
system_error( int ev, const error_category & ecat,
const char * what_arg )
: std::runtime_error(what_arg), m_error_code(ev,ecat) {}