Re: Changing to MinDependency introduces *crazy* errors ...

From: Alexander Nickolov (agnickolov_at_mvps.org)
Date: 11/02/04


Date: Tue, 2 Nov 2004 09:53:36 -0800

Looks like you can't use MFC's CString with min-dependency
builds, even though it's been ported for use in ATL. Try WTL's
CString instead, but I'm not sure if it's suitable either...

-- 
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@mvps.org
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
"sammy" <polar_ninja@yahoo.com> wrote in message 
news:ecf32d9c.0411012011.4425d561@posting.google.com...
> Hi,
> I'm building a COM ATL dll, that uses MFC to make a dialog.
>
> now everything is fine on my XP development box, but the DLL has to
> run on 95/98/Me, so i'm building it with Unicode and MinDependency
> (since the 95/98/Me ATL.DLL is different)
>
> so far so good.
>
> so when i switch on Properties | General | Minimize CRT Use in ATL
> (set to 'Yes')
>
> i get all these errors (see below)... Why ?  what else do i have to
> set ?  what is the cause?? Perplexing, especially since none of this
> is in my code ...
>
> any hints, suggestions or directions would be appreciated ..
> thanks,
> sammy
>
> <compiler error snippet>
>
> c:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\atlmfc\include\afxstr.h(38) : error C2039: 'ChTraitsCRT' : is
> not a member of 'ATL'
> c:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\atlmfc\include\afxstr.h(38) : error C2065: 'ChTraitsCRT' :
> undeclared identifier
> c:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\atlmfc\include\afxstr.h(38) : error C2275: '_CharType' :
> illegal use of this type as an expression
>        c:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\atlmfc\include\afxstr.h(101) : see declaration of '_CharType'
> c:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\atlmfc\include\afxstr.h(38) : error C2974: 'StrTraitMFC' :
> invalid template argument for 'StringIterator', type expected
>        c:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\atlmfc\include\afxstr.h(52) : see declaration of
> 'StrTraitMFC'
> c:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\atlmfc\include\afxstr.h(101) : error C3203: 'StrTraitMFC' :
> class template invalid as template argument for template parameter
> 'StringTraits', expected a real type
> c:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\atlmfc\include\afxstr.h(101) : warning C4091: 'typedef ' :
> ignored on left of 'ATL::CStringT<BaseType,StringTraits>' when no
> variable is declared
>        with
>        [
>            BaseType=wchar_t,
>            StringTraits=int
>        ]
> c:\Program Files\Microsoft Visual Studio .NET
> 2003\Vc7\atlmfc\include\afxstr.h(101) : error C2143: syntax error :
> missing ';' before '>'
>
> <end code snippet> 


Relevant Pages

  • Changing to MinDependency introduces *crazy* errors ...
    ... I'm building a COM ATL dll, that uses MFC to make a dialog. ... class template invalid as template argument for template parameter ...
    (microsoft.public.vc.atl)
  • Problem with #include when "Minimize CRT use in ATL" is set to yes
    ... class template invalid as template argument for template parameter 'StringTraits', expected a real type ...
    (microsoft.public.vc.language)
  • Type Library import in VC++
    ... I have a problem importing a Microsoft Office type libraries into my ... I am using Visual Studio 2005. ... \wingdi.h: see declaration of 'Rectangle' ... class template can't be used as a template argument for template ...
    (microsoft.public.vc.mfc)
  • Re: Asp.net 2.0
    ... Visual Studio 2005 Tools let you build Smart Client ... The Internet is not a Microsoft Office System application. ... Could it have anything to do with this being VSTO 2005? ... That will open to the equivalent template dialog in VS 2003. ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: VS 2008 Project and Item Templates
    ... introduce a general solution to locate the template files. ... C:\Program Files\Microsoft Visual Studio ... the template file is cached in the folder C:\Program ... Microsoft Online Community Support ...
    (microsoft.public.vsnet.general)