Boost unit test fails to compile with Visual Studio 8 SP1
Hi, I just upgrade my visual studio 8 install to SP1 and now I am unable to compile a simple unit test. The compilation error I am getting is: cl /EHsc /W3 /Wp64 /RTCsu /Gm /Ob0 /Od /MTd /TP /DFUSE_DB_WITH_MFC /DWIN32 /D_DEBUG /D_MBCS /IY:\sys\lib\boost_1_34_1\include /Idb\src /c db\test\fuse_db-tests.cpp /Fobuild-db-vc80-mt-sgd\test\fuse_db-tests.obj /Zi /Fdbuild-db-vc80-mt-sgd\test\fuse_db-tests.obj.pdb Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86 Copyright (C) Microsoft Corporation. All rights reserved. fuse_db-tests.cpp In fuse_db_tests.cpp C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\iterator(730) : error C2953: 'stdext::checked_array_iterator' : class template has already been defined C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\xutility(3220) : see declaration of 'stdext::checked_array_iterator' When I compile with /showIncludes I see that the xutility header is included by: Note: including file: Y:\sys\lib\boost_1_34_1\include\boost/shared_ptr.hpp Note: including file: Y:\sys\lib\boost_1_34_1\include\boost/config.hpp Note: including file: C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\memory Note: including file: C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\iterator Has anyone else run into this problem? Regards, Sebastian
Sebastian Hauer
C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\iterator(730) : error C2953: 'stdext::checked_array_iterator' : class template has already been defined C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\xutility(3220) : see declaration of 'stdext::checked_array_iterator'
Note: including file: Y:\sys\lib\boost_1_34_1 \include\boost/shared_ptr.hpp Note: including file: Y:\sys\lib\boost_1_34_1\include\boost/config.hpp Note: including file: C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\memory Note: including file: C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\iterator
Has anyone else run into this problem?
I think you misplace the issue. Looks like the problem is either in shared_ptr.hpp or in Microsoft own headers. Gennadiy
I can't say where your problem lies, but I recognize the namespace stdext.
It's where MS put stuff like hash tables that are very common extensions but
not actually part of the standard.
IIRC they used to put this stuff into namespace std and moved it - I think -
when VS2005 was released.
HTH,
- Richard
-----Original Message-----
From: boost-users-bounces@lists.boost.org
[mailto:boost-users-bounces@lists.boost.org] On Behalf Of Gennadiy Rozental
Sent: 19 September 2007 14:51
To: boost-users@lists.boost.org
Subject: [Boost-users] [shared_ptr]Re: Boost unit test fails to compile with
Visual Studio 8 SP1
Sebastian Hauer
C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\iterator(730) : error C2953: 'stdext::checked_array_iterator' : class template has already been defined C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\xutility(3220) : see declaration of 'stdext::checked_array_iterator'
Note: including file: Y:\sys\lib\boost_1_34_1 \include\boost/shared_ptr.hpp Note: including file: Y:\sys\lib\boost_1_34_1\include\boost/config.hpp Note: including file: C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\memory Note: including file: C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\iterator
Has anyone else run into this problem?
I think you misplace the issue. Looks like the problem is either in shared_ptr.hpp or in Microsoft own headers. Gennadiy _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Hello Gennadiy,
Thanks for the reply.
On 9/19/07, Gennadiy Rozental
Sebastian Hauer
writes: C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\iterator(730) : error C2953: 'stdext::checked_array_iterator' : class template has already been defined C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\xutility(3220) : see declaration of 'stdext::checked_array_iterator'
Note: including file: Y:\sys\lib\boost_1_34_1 \include\boost/shared_ptr.hpp Note: including file: Y:\sys\lib\boost_1_34_1\include\boost/config.hpp Note: including file: C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\memory Note: including file: C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\iterator
Has anyone else run into this problem?
I think you misplace the issue. Looks like the problem is either in shared_ptr.hpp or in Microsoft own headers.
I think the problem just manifested itself when I compiled one of my unit tests but was not necessarily boost unit test specific. I ended up not having the time to deal with it and uninstalled it again. I installed SP1 for VC8 since I read somewhere that it addressed a memory leak issues with regards to their streams implementation and custom facets. After the uninstall of SP1 everything worked again as expected and compiled just fine :) Regards, Sebastian
Sebastian Hauer:
Hi, I just upgrade my visual studio 8 install to SP1 and now I am unable to compile a simple unit test. The compilation error I am getting is:
cl /EHsc /W3 /Wp64 /RTCsu /Gm /Ob0 /Od /MTd /TP /DFUSE_DB_WITH_MFC /DWIN32 /D_DEBUG /D_MBCS /IY:\sys\lib\boost_1_34_1\include /Idb\src /c db\test\fuse_db-tests.cpp /Fobuild-db-vc80-mt-sgd\test\fuse_db-tests.obj /Zi /Fdbuild-db-vc80-mt-sgd\test\fuse_db-tests.obj.pdb
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86 Copyright (C) Microsoft Corporation. All rights reserved.
fuse_db-tests.cpp In fuse_db_tests.cpp C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\iterator(730) : error C2953: 'stdext::checked_array_iterator' : class template has already been defined C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\xutility(3220) : see declaration of 'stdext::checked_array_iterator'
What happens if you just compile #include <iterator> ? If it fails in the same way, this is obviously a problem in the system headers, although I can't imagine something similar slipping in undetected... What are the contents of the lines around iterator:730 and xutility:3220?
participants (4)
-
Gennadiy Rozental
-
Peter Dimov
-
Richard
-
Sebastian Hauer