Re: errors after upgrading to VS2008

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hello Paul,

Did you by any chance find solution to this problem? Because, after I
upgraded Visual Studio from 2005 to 2008, I am getting same errors when I
compile my project.

Any help would be appreciated.

Thanks,
Muthiah.

"PaulH" wrote:

On Dec 3, 4:30 pm, "Ben Voigt [C++ MVP]" <r...@xxxxxxxxxxxxx> wrote:
"PaulH" <paul.h...@xxxxxxxxx> wrote in message

news:1995103c-262f-4350-b89d-a9ad09519267@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

After upgrading to VS2008, I started getting errors for lstrlenA,
size_t, and lstrcpynA.
My "include directories" settings are exactly the same as VS2005, and
if I open the project in VS2005, everything compiles just fine.
I assume the problem is because the headers in "$(VCInstallDir)ce
\atlmfc\include" have changed for VS2008 and are now incompatible with
WTL.

Has anybody found a fix or workaround for this?

Where is the "using namespace ATL;" coming from? Your code or one of the
headers?



Thanks,
PaulH

1>C:\WTL80_sf\include\atlapp.h(697) : error C2668: 'lstrlenA' :
ambiguous call to overloaded function
1> C:\Program Files\Microsoft Visual Studio 9.0\SmartDevices\SDK
\PocketPC2003\include\winbase.h(626): could be 'int lstrlenA(LPCSTR)'
1> C:\Program Files\Microsoft Visual Studio 9.0\VC\ce\atlmfc
\include\atlosapice.h(840): or 'int ATL::lstrlenA(LPCSTR)'
1> while trying to match the argument list '(const char *)'
1>C:\WTL80_sf\include\atlapp.h(737) : error C2668: 'lstrlenA' :
ambiguous call to overloaded function
1> C:\Program Files\Microsoft Visual Studio 9.0\SmartDevices\SDK
\PocketPC2003\include\winbase.h(626): could be 'int lstrlenA(LPCSTR)'
1> C:\Program Files\Microsoft Visual Studio 9.0\VC\ce\atlmfc
\include\atlosapice.h(840): or 'int ATL::lstrlenA(LPCSTR)'
1> while trying to match the argument list '(const char *)'
1>C:\WTL80_sf\include\atlapp.h(737) : error C2514: 'size_t' : class
has no constructors
1> predefined C++ types (compiler internal)(19) : see
declaration of 'size_t'
1>C:\WTL80_sf\include\atlapp.h(737) : error C2668: 'lstrlenA' :
ambiguous call to overloaded function
1> C:\Program Files\Microsoft Visual Studio 9.0\SmartDevices\SDK
\PocketPC2003\include\winbase.h(626): could be 'int lstrlenA(LPCSTR)'
1> C:\Program Files\Microsoft Visual Studio 9.0\VC\ce\atlmfc
\include\atlosapice.h(840): or 'int ATL::lstrlenA(LPCSTR)'
1> while trying to match the argument list '(const char *)'
1>C:\WTL80_sf\include\atlapp.h(737) : error C2514: 'size_t' : class
has no constructors
1> predefined C++ types (compiler internal)(19) : see
declaration of 'size_t'
1>C:\WTL80_sf\include\atlapp.h(746) : error C3861: 'lstrcpynA':
identifier not found
1>C:\WTL80_sf\include\atlapp.h(793) : error C2668: 'lstrlenA' :
ambiguous call to overloaded function
1> C:\Program Files\Microsoft Visual Studio 9.0\SmartDevices\SDK
\PocketPC2003\include\winbase.h(626): could be 'int lstrlenA(LPCSTR)'
1> C:\Program Files\Microsoft Visual Studio 9.0\VC\ce\atlmfc
\include\atlosapice.h(840): or 'int ATL::lstrlenA(LPCSTR)'
1> while trying to match the argument list '(const char *)'


I believe it's coming in from atlbase.h which is included in my
stdafx.h.

.



Relevant Pages

  • Re: newb question: need help with homework assignment
    ... > int totalMinutes; ... Homework operator+const; ... I don't like more than one declaration per line ... Again you should learn about constructors. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Sun CC compiler: function overloads
    ... A use of an overloaded function name without arguments is resolved ... void add (int, int, bool); ... struct visitor ...
    (comp.unix.solaris)
  • Re: ambigious call to overloaded function?
    ... message ambigious call to overloaded function? ... void printArray; ... int mean; ... int mean(int b, int number2) ...
    (comp.lang.c.moderated)
  • Re: errors after upgrading to VS2008
    ... ambiguous call to overloaded function ... \include\atlosapice.h: or 'int ATL::lstrlenA' ... has no constructors ... declaration of 'size_t' ...
    (microsoft.public.vc.language)
  • Re: errors after upgrading to VS2008
    ... ambiguous call to overloaded function ... \include\atlosapice.h: or 'int ATL::lstrlenA' ... has no constructors ... declaration of 'size_t' ...
    (microsoft.public.vc.language)