Yes, some clues
Your error means that the type CY is not defined.
It *should* be defined in <WTypes.h>, included in <winscard.h>, that is in turn included in <windows.h>.
You could bypass any of these inclusions by using some preprocessor definitions.
My bet is – you have defined WIN32_LEAN_AND_MEAN. Did I win?
Vlad - MS MVP [2007 - 2012] - www.FeinSoftware.com
Convenience and productivity tools for Microsoft Visual Studio: FeinViewer - an integrated GDI objects viewer for Visual C++ Debugger, and more...
No, I´ve not defined WIN32_LEAN_AND_MEAN. I defined CY on WTypes.h but it appeared another errors:
1>c:\program files\microsoft sdks\windows\v7.0a\include\wtypes.h(2): error C2143: syntax error : missing ';' before 'constant'
1>c:\program files\microsoft sdks\windows\v7.0a\include\wtypes.h(1052): error C2371: 'CY' : redefinition; different basic types
1> c:\program files\microsoft sdks\windows\v7.0a\include\wtypes.h(2) : see declaration of 'CY'
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\atlcomcli.h(2071): error C2766: explicit specialization; 'ATL::_CVarTypeInfo<int>' has already been defined
1> c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\atlcomcli.h(1839) : see previous definition of '_CVarTypeInfo<int>'
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\atlcomcli.h(2073): error C2374: 'pmField' : redefinition; multiple initialization
1> c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\atlcomcli.h(1842) : see declaration of 'pmField'
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\atlcomcli.h(2081): error C2766: explicit specialization; 'ATL::_CVarTypeInfo<int*>' has already been defined
1> c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\atlcomcli.h(1849) : see previous definition of '_CVarTypeInfo<int *>'
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\atlcomcli.h(2083): error C2374: 'pmField' : redefinition; multiple initialization
1> c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\atlcomcli.h(1852) : see declaration of 'pmField'
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\atlcomcli.h(2465): error C2535: 'ATL::CComVariant &ATL::CComVariant:perator =(int)' : member function already defined or declared
1> c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\atlcomcli.h(2397) : see declaration of 'ATL::CComVariant:perator ='
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\atlcomcli.h(2216): error C2228: left of '.Hi' must have class/struct/union
1> type is 'CY'
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\atlcomcli.h(2216): error C2228: left of '.Hi' must have class/struct/union
1> type is 'CY'
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\atlcomcli.h(2217): error C2228: left of '.Lo' must have class/struct/union
1> type is 'CY'
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\atlcomcli.h(2217): error C2228: left of '.Lo' must have class/struct/union
1> type is 'CY'
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\atlcomcli.h(2471): error C2228: left of '.Hi' must have class/struct/union
1> type is 'CY'
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\atlcomcli.h(2471): error C2228: left of '.Hi' must have class/struct/union
1> type is 'CY'
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\atlcomcli.h(2472): error C2228: left of '.Lo' must have class/struct/union
1> type is 'CY'
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\atlcomcli.h(2472): error C2228: left of '.Lo' must have class/struct/union
1> type is 'CY'
this is very strange, a file of Visual Studio itself!
What do you mean - "I defined"???
The type CY *IS* defined in <WTypes.h>, on line # 1051!
Line # 2 in that file has a comment.
Did you type something in yourself?
Vlad - MS MVP [2007 - 2012] - www.FeinSoftware.com
Convenience and productivity tools for Microsoft Visual Studio: FeinViewer - an integrated GDI objects viewer for Visual C++ Debugger, and more...
I defined CY on WTypes.h but it appeared another errors
and
Originally Posted by michaelhsilva
I just put
Code:
typedef CY CURRENCY
on <WTypes.h>
I took that to mean that you hand edited the file. The first three lines in your log lead me to believe that you had added the 'typedef' to the header file before the declaration of "CY".
No. That line really says nothing. And, you shouldn't be modifying SDK header files, unless you wrote them. It seems like you might have something in one of your header files, not Windows header files, that might be changing CURRENCY to something else. If you add the compiler option "/E" you can see what the preprocessor is doing. Search the output for "CURRENCY".
Bookmarks