BRoyds

I have just installed VSC++ Express SP1 beta and now nothing compiles because there seems to be problems in the xutility library.

Here is the version information from help:

Microsoft Visual Studio 2005
Version 8.0.50727.363 (SP.050727-3600)
Microsoft .NET Framework
Version 2.0.50727

Installed Edition: VC Express

Microsoft Visual C++ 2005 76542-000-0000011-00125
Microsoft Visual C++ 2005

Here is a simple Hello World program that won't compile:

// HelloWorld.cpp : Defines the entry point for the console application.

//

#include "stdafx.h"

#include <iostream>

int _tmain(int argc, _TCHAR* argv[])

{

std::cout << "Hello World\n";

return 0;

}

Here are the first few error messages:

------ Build started: Project: HelloWorld, Configuration: Debug Win32 ------

Compiling...

HelloWorld.cpp

c:\program files\microsoft visual studio 8\vc\include\xutility(3417) : warning C4346: 'std::_Is_checked_iterator<_OutIt>::_Result' : dependent name is not a type

prefix with 'typename' to indicate a type

c:\program files\microsoft visual studio 8\vc\include\xutility(3417) : error C2144: syntax error : 'std::_Enable_if<!std::_Is_checked_iterator<_OutIt>::_Result,_OutIt>::_Result' should be preceded by ';'

c:\program files\microsoft visual studio 8\vc\include\xutility(3417) : error C2433: '_SCL_CHECKED_ALGORITHM_WARN' : 'inline' not permitted on data declarations

c:\program files\microsoft visual studio 8\vc\include\xutility(3417) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

c:\program files\microsoft visual studio 8\vc\include\xutility(3417) : error C2065: '_InIt' : undeclared identifier

c:\program files\microsoft visual studio 8\vc\include\xutility(3417) : error C2146: syntax error : missing ')' before identifier '_First'

c:\program files\microsoft visual studio 8\vc\include\xutility(3417) : warning C4229: anachronism used : modifiers on data are ignored

c:\program files\microsoft visual studio 8\vc\include\xutility(3417) : error C2365: 'stdext::checked_copy' : redefinition; previous definition was 'function'

c:\program files\microsoft visual studio 8\vc\include\xutility(3417) : error C2059: syntax error : ')'

c:\program files\microsoft visual studio 8\vc\include\xutility(3426) : error C2143: syntax error : missing ';' before '{'

c:\program files\microsoft visual studio 8\vc\include\xutility(3426) : error C2447: '{' : missing function header (old-style formal list )

c:\program files\microsoft visual studio 8\vc\include\xutility(3442) : warning C4346: 'std::_Is_checked_iterator<_OutIt>::_Result' : dependent name is not a type

prefix with 'typename' to indicate a type

c:\program files\microsoft visual studio 8\vc\include\xutility(3442) : error C2144: syntax error : 'std::_Enable_if<!std::_Is_checked_iterator<_OutIt>::_Result,_BidIt2>::_Result' should be preceded by ';'

c:\program files\microsoft visual studio 8\vc\include\xutility(3442) : error C2433: '_SCL_CHECKED_ALGORITHM_WARN' : 'inline' not permitted on data declarations

c:\program files\microsoft visual studio 8\vc\include\xutility(3442) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

c:\program files\microsoft visual studio 8\vc\include\xutility(3442) : error C2086: 'int stdext::_SCL_CHECKED_ALGORITHM_WARN' : redefinition

c:\program files\microsoft visual studio 8\vc\include\xutility(3417) : see declaration of 'stdext::_SCL_CHECKED_ALGORITHM_WARN'

c:\program files\microsoft visual studio 8\vc\include\xutility(3442) : error C2065: '_BidIt1' : undeclared identifier

c:\program files\microsoft visual studio 8\vc\include\xutility(3442) : error C2146: syntax error : missing ')' before identifier '_First'

c:\program files\microsoft visual studio 8\vc\include\xutility(3442) : warning C4229: anachronism used : modifiers on data are ignored

c:\program files\microsoft visual studio 8\vc\include\xutility(3442) : error C2365: 'stdext::checked_copy_backward' : redefinition; previous definition was 'function'

c:\program files\microsoft visual studio 8\vc\include\xutility(3433) : see declaration of 'stdext::checked_copy_backward'



Re: Visual C++ Express Edition C++ Express Compiler fails after installing SP1 beta

SvenC

I have VS2005 Team Suite with SP1 Beta and your code compiles flawlessly. Please take the time to report the error on connect.windows.com\VisualStudio - maybe it is only related to the express version.

--
SvenC





Re: Visual C++ Express Edition C++ Express Compiler fails after installing SP1 beta

LazyGenius

I am also getting the same problem (and many, many more). From code that compiled perfectly to 211 errors. We are using C++/CLI (against my better judgement) which has caused a few such problems.

The thing I find interesting is that a lot of these errors are being thrown up in <xutility> which i'm not even including. Am I better off uninstalling the SP until there is a SP for it

Edit: I should mention that i'm using VS.2005 Professional. I have been experimenting and found that if I rebuild each project individually (I have many projects in my one solution) the first few rebuild OK. However, I am still getting the same errors as above.




Re: Visual C++ Express Edition C++ Express Compiler fails after installing SP1 beta

orcmid

1. Try deleting the #include "stdafx.h"

2. Go into your project configuration and turn off any pre-compiled headers option.

See if that helps.

If making a Win32 Windows Console program still doesn't work, try a General | Empty Project and see what happens when you use Standard C++ (change the _tmain to a standard main entry and use char * throughout - no Unicode).   See how something that simple works.

 - Dennis

 

 






Re: Visual C++ Express Edition C++ Express Compiler fails after installing SP1 beta

Sporten

On line 3429 in xutility.h
_SCL_CHECKED_ALGORITHM_WARN
change to
#define _SCL_CHECKED_ALGORITHM_WARN

That fixed the problem for me. i know its not correct solution but it does the job.