April 24th, 2009, 04:55 AM
#1
Undeclared identifier in header files
Hi
As my title says I have this error, but I'm wondering because these header files are built in header files not customize.
here are the errors
Code:
--------------------Configuration: NewServer - Win32 Debug--------------------
Compiling...
StdAfx.cpp
c:\program files\microsoft visual studio\vc98\include\basetyps.h(149) : warning C4005: 'interface' : macro redefinition
c:\program files\microsoft visual studio 8\vc\platformsdk\include\objbase.h(193) : see previous definition of 'interface'
c:\program files\microsoft visual studio\vc98\include\basetyps.h(155) : warning C4005: 'DECLARE_INTERFACE' : macro redefinition
c:\program files\microsoft visual studio 8\vc\platformsdk\include\objbase.h(201) : see previous definition of 'DECLARE_INTERFACE'
c:\program files\microsoft visual studio\vc98\include\basetyps.h(156) : warning C4005: 'DECLARE_INTERFACE_' : macro redefinition
c:\program files\microsoft visual studio 8\vc\platformsdk\include\objbase.h(202) : see previous definition of 'DECLARE_INTERFACE_'
Compiling...
ChattingDlg.cpp
c:\program files\microsoft visual studio\vc98\include\comdef.h(695) : error C2065: 'IAsyncSetup' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(710) : error C2065: 'IClassAccess' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(712) : error C2065: 'IClassAdmin' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(715) : error C2065: 'IClassRefresh' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(750) : error C2065: 'IEnumClass' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(762) : error C2065: 'IEnumPackage' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(1078) : error C2065: 'IXMLElementNotificationSink' : undeclared identifier
ClientSocket.cpp
c:\program files\microsoft visual studio\vc98\include\comdef.h(695) : error C2065: 'IAsyncSetup' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(710) : error C2065: 'IClassAccess' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(712) : error C2065: 'IClassAdmin' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(715) : error C2065: 'IClassRefresh' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(750) : error C2065: 'IEnumClass' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(762) : error C2065: 'IEnumPackage' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(1078) : error C2065: 'IXMLElementNotificationSink' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\iostream.h(58) : fatal error C1083: Cannot open include file: 'ostream.h': No such file or directory
ClientUser.cpp
c:\program files\microsoft visual studio\vc98\include\iostream.h(58) : fatal error C1083: Cannot open include file: 'ostream.h': No such file or directory
ConnectThread.cpp
c:\program files\microsoft visual studio\vc98\include\comdef.h(695) : error C2065: 'IAsyncSetup' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(710) : error C2065: 'IClassAccess' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(712) : error C2065: 'IClassAdmin' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(715) : error C2065: 'IClassRefresh' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(750) : error C2065: 'IEnumClass' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(762) : error C2065: 'IEnumPackage' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(1078) : error C2065: 'IXMLElementNotificationSink' : undeclared identifier
Lib.cpp
c:\program files\microsoft visual studio\vc98\include\iostream.h(58) : fatal error C1083: Cannot open include file: 'ostream.h': No such file or directory
ListeningSocket.cpp
c:\program files\microsoft visual studio\vc98\include\comdef.h(695) : error C2065: 'IAsyncSetup' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(710) : error C2065: 'IClassAccess' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(712) : error C2065: 'IClassAdmin' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(715) : error C2065: 'IClassRefresh' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(750) : error C2065: 'IEnumClass' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(762) : error C2065: 'IEnumPackage' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(1078) : error C2065: 'IXMLElementNotificationSink' : undeclared identifier
LoginDlg.cpp
Machine.cpp
MainFrm.cpp
NetData.cpp
c:\program files\microsoft visual studio\vc98\include\comdef.h(695) : error C2065: 'IAsyncSetup' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(710) : error C2065: 'IClassAccess' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(712) : error C2065: 'IClassAdmin' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(715) : error C2065: 'IClassRefresh' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(750) : error C2065: 'IEnumClass' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(762) : error C2065: 'IEnumPackage' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(1078) : error C2065: 'IXMLElementNotificationSink' : undeclared identifier
NetDataCtl.cpp
NewServer.cpp
c:\program files\microsoft visual studio\vc98\include\comdef.h(695) : error C2065: 'IAsyncSetup' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(710) : error C2065: 'IClassAccess' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(712) : error C2065: 'IClassAdmin' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(715) : error C2065: 'IClassRefresh' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(750) : error C2065: 'IEnumClass' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(762) : error C2065: 'IEnumPackage' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(1078) : error C2065: 'IXMLElementNotificationSink' : undeclared identifier
NewServerDoc.cpp
NewServerView.cpp
c:\program files\microsoft visual studio\vc98\include\comdef.h(695) : error C2065: 'IAsyncSetup' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(710) : error C2065: 'IClassAccess' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(712) : error C2065: 'IClassAdmin' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(715) : error C2065: 'IClassRefresh' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(750) : error C2065: 'IEnumClass' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(762) : error C2065: 'IEnumPackage' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(1078) : error C2065: 'IXMLElementNotificationSink' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\iostream.h(58) : fatal error C1083: Cannot open include file: 'ostream.h': No such file or directory
OptionDlg.cpp
ReportCtrl.cpp
RoomDlg.cpp
c:\program files\microsoft visual studio\vc98\include\comdef.h(695) : error C2065: 'IAsyncSetup' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(710) : error C2065: 'IClassAccess' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(712) : error C2065: 'IClassAdmin' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(715) : error C2065: 'IClassRefresh' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(750) : error C2065: 'IEnumClass' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(762) : error C2065: 'IEnumPackage' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(1078) : error C2065: 'IXMLElementNotificationSink' : undeclared identifier
SqlDB.cpp
c:\program files\microsoft visual studio\vc98\include\comdef.h(695) : error C2065: 'IAsyncSetup' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(710) : error C2065: 'IClassAccess' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(712) : error C2065: 'IClassAdmin' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(715) : error C2065: 'IClassRefresh' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(750) : error C2065: 'IEnumClass' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(762) : error C2065: 'IEnumPackage' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(1078) : error C2065: 'IXMLElementNotificationSink' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\iostream.h(58) : fatal error C1083: Cannot open include file: 'ostream.h': No such file or directory
SrvEventSink.cpp
UserInfo.cpp
c:\program files\microsoft visual studio\vc98\include\comdef.h(695) : error C2065: 'IAsyncSetup' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(710) : error C2065: 'IClassAccess' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(712) : error C2065: 'IClassAdmin' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(715) : error C2065: 'IClassRefresh' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(750) : error C2065: 'IEnumClass' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(762) : error C2065: 'IEnumPackage' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(1078) : error C2065: 'IXMLElementNotificationSink' : undeclared identifier
Generating Code...
If I run the original code in release code the program works fine, but if i try to rebuild the project then those errors will popup and I don't know why as they are built in header files.
I'm just new to visual c or even to c although I have basic c knowledge, but I know it's not enough. I'm a vb programmer so debugging a program that I don't really understand is very frustrating, I know it's suicide, but I don't have a choice. Right now I need to make it run that's all I need to workout at the moment, so if some one can point me to the right direction I would highly appreciate it.
Many thanks
Dennis
April 24th, 2009, 06:29 AM
#2
Re: Undeclared identifier in header files
What are you trying to build? It looks like you're not including some files, or they don't exist. Where is IAsyncSetup defined, for instance?
April 24th, 2009, 07:17 AM
#3
Re: Undeclared identifier in header files
Do I need to define it? They are built in header files in Visual C++ I though the type variable or what ever declaration the built in header file has don't need to be declared or defined? unless it's a user define header. Am I missing something?
April 24th, 2009, 09:16 AM
#4
Re: Undeclared identifier in header files
No, but the right headers need to be included. In the right order.
April 27th, 2009, 04:18 AM
#5
Re: Undeclared identifier in header files
I though it should be taking care of by visual c++ itself since it is a built in header files?
if it should be included in the correct order what header files should be included before the basetyps.h so on and so forth?
April 27th, 2009, 04:44 AM
#6
Re: Undeclared identifier in header files
Originally Posted by
Dennis_R
here are the errors
Code:
--------------------Configuration: NewServer - Win32 Debug--------------------
Compiling...
StdAfx.cpp
c:\program files\microsoft visual studio\vc98 \include\basetyps.h(149) : warning C4005: 'interface' : macro redefinition
c:\program files\microsoft visual studio 8 \vc\platformsdk\include\objbase.h(193) : see previous definition of 'interface'
...
Why do you mix the VC98 (VC++6.0) code with a "microsoft visual studio 8" PSDK code?
I guess it is NOT allowed!
Victor Nijegorodov
April 27th, 2009, 05:18 AM
#7
Re: Undeclared identifier in header files
Good catch there. Their not compatible.
April 27th, 2009, 06:41 AM
#8
Re: Undeclared identifier in header files
Originally Posted by
VictorN
Why do you mix the VC98 (VC++6.0) code with a "microsoft visual studio 8" PSDK code?
I guess it is NOT allowed!
Let's forget about the include files in the platformsdk folder. This is not my source code it was given to us by one of our client to debug, but they didn't give us the dependencies.
hmmm.... so it's not compatible... I'll remove the platform folder in my include files.
Any suggestion where can I find the header files in the platform folder that is compatible with visual c++ 6?
Ok back to the topic. Any ideas about undeclared identifier error?
Last edited by Dennis_R; April 27th, 2009 at 06:48 AM .
April 27th, 2009, 06:51 AM
#9
Re: Undeclared identifier in header files
Originally Posted by
Dennis_R
Any suggestion where can I find the header files in the platform folder that is compatible with visual c++ 6?
If you meant "what PSDK is compatible with visual c++ 6" then the answer would be:
The last PSDK compatible with visual c++ 6 is the one from February 2003
Originally Posted by
Dennis_R
Ok back to the topic. Any ideas about the errors? What are the possible causes of these errors?
You must first correct this platform incompatibility.
Then we could look at the other problems (if any).
Victor Nijegorodov
April 28th, 2009, 04:28 AM
#10
Re: Undeclared identifier in header files
I already downloaded the SDK that is compatible with Visual C++, but still I received the same error messages.
Code:
c:\program files\microsoft visual studio\vc98\include\comdef.h(695) : error C2065: 'IAsyncSetup' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(710) : error C2065: 'IClassAccess' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(712) : error C2065: 'IClassAdmin' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(715) : error C2065: 'IClassRefresh' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(750) : error C2065: 'IEnumClass' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(762) : error C2065: 'IEnumPackage' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\comdef.h(1078) : error C2065: 'IXMLElementNotificationSink' : undeclared identifier
e:\casino\golden\golden\+¦¦¦+¦server&utils\+¡¦÷\2008-04-02\server\gameserver_gold\debug\msado15.tlh(409) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
c:\program files\microsoft visual studio\vc98\include\basetyps.h(155) : warning C4005: 'DECLARE_INTERFACE' : macro redefinition
c:\program files\microsoft sdk\include\objbase.h(200) : see previous definition of 'DECLARE_INTERFACE'
c:\program files\microsoft visual studio\vc98\include\basetyps.h(156) : warning C4005: 'DECLARE_INTERFACE_' : macro redefinition
c:\program files\microsoft sdk\include\objbase.h(201) : see previous definition of 'DECLARE_INTERFACE_'
Any ideas why I'm having this error? comdef.h is built in to Visual C++ and I don't remember in anyway modifying it. Are there any files that I need to add etc..?
April 28th, 2009, 05:27 AM
#11
Re: Undeclared identifier in header files
Did you register the PSDK directories with Visual Studio?
Also have a look at this thread.
Victor Nijegorodov
April 28th, 2009, 06:02 AM
#12
Re: Undeclared identifier in header files
Originally Posted by
VictorN
Did you register the PSDK directories with Visual Studio?
Also have a look at
this thread.
If you meant If I add the include and lib directories in my Visual C++ Directories, then yes.
I read the problem regarding with WMI from the link that you gave, but I don't have $(VCInstallDir)PlatformSDK\include in my include directories. I only have the basic include folders and the SDK which I just downloaded and all the include files are in the same directories I don't have windows\v6.0\include folder too.
Attached Images
April 28th, 2009, 06:08 AM
#13
Re: Undeclared identifier in header files
Your "include directories" order is wrong!
The "Microsoft SDK" must be above all the others!
See the example:
Attached Images
Victor Nijegorodov
April 28th, 2009, 06:11 AM
#14
Re: Undeclared identifier in header files (RESOLVED)
Originally Posted by
VictorN
Your "include directories" order is wrong!
The "Microsoft SDK" must be above all the others!
See the example:
Yes changing the order seems to solve the problem
Thanks
Last edited by Dennis_R; April 28th, 2009 at 06:16 AM .
April 28th, 2009, 06:13 AM
#15
Re: Undeclared identifier in header files
Victor Nijegorodov
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width