Re: Problem in compiling a VC++ Studio Project on VC++.Net Plateform.

From: Bo Persson (bop_at_gmb.dk)
Date: 07/14/04


Date: Wed, 14 Jul 2004 14:13:43 +0200


"Ram Kumar" <efextra@newsgroups.nospam> skrev i meddelandet
news:OLbe2VZaEHA.212@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> I'm upgrading a VC++ Studio Project on VC++.Net Platform. In this
project,
> it has been used "byteSafeVector". and so related header file
> "T_SafeVector.h". There is no build problem on VC++ Studio 6.0
Platform. But

There is no problem on VC6 because the compiler doesn't know better.

> when I'm compiling it on VC++.Net 2003 Platform, I find following
error
> messages-
>
> d:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\PlatformSDK\Include\T_SafeVector.h(74) : warning C4346:
> 'TNContainer::iterator' : dependent name is not a type
> prefix with 'typename' to indicate a type
> d:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\PlatformSDK\Include\T_SafeVector.h(119) : see reference to
class
> template instantiation 'T_SAExtractScaler<TNContainer,TNDataType>'
being
> compiled
> d:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\PlatformSDK\Include\T_SafeVector.h(74) : error C2061: syntax
error
> : identifier 'iterator'
>
> Obviously I can't modify the header file by prefixing typename at
those
> errors & warning places.

"Obviously" that might be what you have to do. The compiler is correct,
and the code is pre-standard. A dependent name that is a type must be
preceded by 'typename', otherwise the compiler must assume that the name
is not a type.

> These errors & warning are in following way in T_SafeVector.h
>
> //t_safevector.h file
> ....
> void GetFromContainer
> (
> TNContainer& _cont,
> void * pData,
> TNContainer::iterator walk, <=warning C4346:
'TNContainer::iterator' :
> dependent name is not a type
> ......
> .....
>
> Kindly help me.

Maybe you should contact MS support and ask what kind of crap they
deliver? :-)

>
> Ram Kumar
>



Relevant Pages

  • Re: Compilation of Code in Microsoft Visual Studio .NET and a couple of other Microsoft .NET questio
    ... I've just recently installed the Visual Studio .net Professional ... part of visual studio, not the compiler. ... then does that mean that I have found a security flaw in .NET or is it just ... Visual Studio .NET will that executable require the .NET framework to be ...
    (microsoft.public.dotnet.general)
  • h file changed and compilation does not detect it
    ... My problem is that when I change h file the Visual Studio 6 compiler does ... not detect it and does not compile the cpp files that includes it. ... I decided to convert the dips and dsw to visual studio 7.1 vcproj files. ...
    (microsoft.public.vc.ide_general)
  • Re: Moving to MSVC++.Net
    ... >> LIB folders from VC6. ... It requires tweaking a few VC6 MFC headers to make ... An easier way to get Visual Studio 2003 and 2005 C/C++ compilers to build ... You won't be able to use the 64-bit compiler bundled with the PSDK on your ...
    (microsoft.public.vc.mfc)
  • Re: hmm..interesting
    ... I used to be a professional software developer on both Unix/Linux (all ... flavours) and Windows (writing CFD and Valve-train dynamics software, ... the fact that Visual Studio allows you to get away with fairly sloppy ... difficult to find a C compiler that *doesn't* have vendor-specific ...
    (comp.sys.acorn.hardware)
  • compiler crashes and cant run asp projects anymore
    ... Visual Basic .NET compiler is unable to recover from the following error: ... But I get this problem only when I start visual studio 2003. ... I create a new asp project, with just one button on the startup form but ... The problem doesn't only occur when debugging, ...
    (microsoft.public.dotnet.general)