mongodb c++ driver 컴파일 에러 도와주세요..ㅠ.ㅠ(vs2008, scons)
288 views
Skip to first unread message
Cooul
unread,
Sep 14, 2011, 2:03:51 AM9/14/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongodb-kr
환경은
VS2008 sp1사용
boost 1.4.2 vs2008 버전 사용
9월5일자 mongodb-linux-x86_64.latest 소스 사용하구요
scons버전에 따라서 2가지 케이스가 발생하네요..
---------------------------------------------------------------------------------
case 1:
Python 2.7.2 installed.
scons 1.2.0 win32 installed.
---------------------------------------------------------------------------------
E:\mongo-cxx-driver-nightly>scons
scons: Reading SConscript files ...
Checking for C library boost_thread-mt... (cached) no
Checking for C library boost_thread... (cached) no
Checking for C library boost_filesystem-mt... (cached) no
Checking for C library boost_filesystem... (cached) no
Checking for C library boost_system-mt... (cached) no
Checking for C library boost_system... (cached) no
Checking for C library boost_thread-mt... (cached) no
Checking for C library boost_thread... (cached) no
scons: done reading SConscript files.
scons: Building targets ...
cl /Foclient\examples\authTest.obj /c client\examples\authTest.cpp /
nologo /TP /
nologo /D_SCONS /DMONGO_EXPOSE_MACROS /Imongo
authTest.cpp
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include
\xlocale(342) : war
ning C4530: C++ exception handler used, but unwind semantics are not
enabled. Sp
ecify /EHsc
e:\mongo-cxx-driver-nightly\mongo\client\../pch.h(41) : fatal error
C1083: Canno
t open include file: 'winsock2.h': No such file or directory
scons: *** [client\examples\authTest.obj] Error 2
scons: building terminated because of errors.
----------------------------------------------------------------------------------
케이스1은 컴파일도중 vs2008 중요 include 디렉토리 설정이 빠저버린것처럼 나오는데
python과 scons처음 써봐서 어디에서 뭘 어떻게 설정해야 할지..-.-;;
C:\Python27\Lib\site-packages\scons-1.2.0\SCons\Tool 폴더에 msvc.py 파일에 설정
이 빠진건지..
---------------------------------------------------------------------------------
case 2:
Python 2.7.2 installed.
scons 1.3.1 win32 installed.
---------------------------------------------------------------------------------
E:\mongo-cxx-driver-nightly>scons
scons: Reading SConscript files ...
Checking for C library boost_thread-mt... no
Checking for C library boost_thread... no
Checking for C library boost_filesystem-mt... no
Checking for C library boost_filesystem... no
Checking for C library boost_system-mt... no
Checking for C library boost_system... no
Checking for C library boost_thread-mt... no
Checking for C library boost_thread... no
scons: done reading SConscript files.
scons: Building targets ...
cl /Foclient\examples\authTest.obj /c client\examples\authTest.cpp /
TP /nologo /
D_SCONS /DMONGO_EXPOSE_MACROS /Imongo
authTest.cpp
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE
\xlocale(342) : war
ning C4530: C++ exception handler used, but unwind semantics are not
enabled. Sp
ecify /EHsc
e:\mongo-cxx-driver-nightly\mongo\util/log.h(410) : error C2664:
'mongo::toUtf8S
tring' : cannot convert parameter 1 from 'LPTSTR' to 'const
std::wstring &'
Reason: cannot convert from 'LPTSTR' to 'const std::wstring'
No constructor could take the source type, or constructor
overload resol
ution was ambiguous
scons: *** [client\examples\authTest.obj] Error 2
scons: building terminated because of errors.
---------------------------------------------------------------------------------
케이스2의 해답은 Character Set을 변경하면 되는거 같긴 한데
대체 어디서 뭘 어떻게 변경해야 하는지 막막하네요..
도와주세요.. ㅠㅠ
Min
unread,
Sep 14, 2011, 10:11:34 AM9/14/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongo...@googlegroups.com
windows 와 인연을 끊어서 예전에 컴파일 한 것이 잘 기억나지는 않지만,
첫번째 문제는 아마 SConstruct 파일을 수정해서 ws32_32.lib 를 적절한 곳(?)에 추가해 주어야 할 것입니다.
charset 은 project 의 설정중에 아마 unicode 와 관련된 것이 있을 것 같네요,