C:\Documents and Settings\Me\My Documents\Programming\C++\Compiler\XPSP2SDK\Include\ObjBase.h(378) : error C2146: syntax error : missing ';' before identifier 'IRpcStubBuffer'
C:\Documents and Settings\Me\My Documents\Programming\C++\Compiler\XPSP2SDK\Include\ObjBase.h(378) : error C2079: 'IRpcStubBuffer' uses undefined struct 'IRpcStubBuffer'
C:\Documents and Settings\Me\My Documents\Programming\C++\Compiler\XPSP2SDK\Include\ObjBase.h(379) : error C2146: syntax error : missing ';' before identifier 'IRpcChannelBuffer'
C:\Documents and Settings\Me\My Documents\Programming\C++\Compiler\XPSP2SDK\Include\ObjBase.h(379) : error C2371: 'IRpcChannelBuffer' : redefinition; different basic types
c:\Documents and Settings\Me\My Documents\Programming\C++\Compiler\XPSP2SDK\Include\RpcNdr.h(676) : see declaration of 'IRpcChannelBuffer'
C:\Documents and Settings\Me\My Documents\Programming\C++\Compiler\XPSP2SDK\Include\Unknwn.h(47) : error C2146: syntax error : missing ';' before identifier 'IUnknown'
C:\Documents and Settings\Me\My Documents\Programming\C++\Compiler\XPSP2SDK\Include\Unknwn.h(53) : error C2146: syntax error : missing ';' before identifier 'AsyncIUnknown'
C:\Documents and Settings\Me\My Documents\Programming\C++\Compiler\XPSP2SDK\Include\Unknwn.h(59) : error C2146: syntax error : missing ';' before identifier 'IClassFactory'
C:\Documents and Settings\Me\My Documents\Programming\C++\Compiler\XPSP2SDK\Include\Unknwn.h(109) : error C2371: 'IUnknown' : redefinition; different basic types
There are literally hundreds of these errors (714 error(s), 77 warning(s), to be exact, plus the "error count exceeds 100; stopping compilation" factor)
What could be doing this? I'm using Visual C++ 2005 Express Edition Beta (which has worked wonderfully for everything else before) on XP Home SP2, 3.0GHz P4 w/HT.
I've compiled on this machine without error before, any ideas?
Never seen this before...
I've been working on a game development project for a while now, and I decided to start up a little side project as well, just using the core components from my other project and incorporating them into my new one.
I just copied code directly from my old project into the new. My old project compiles perfectly. The problem is when I compile the new one it gives me hundreds of errors, not in my code, but to two files I haven't ever seen before: Unknwn.h and ObjBase.h.
Here's a sample of what I'm getting, and this is the same stuff I'm getting repeated over and over for each file that it's trying to build.
One of the header files you wrote is probably missing a semicolon somewhere at the end of the file (possibly a semicolon at the end of a class definition). Since one file may include your header with the missing semicolon followed directly by including another file (which indirectly includes the files you posted), the error will appear to be in the files included later. This is because the file with the missing semicolon is okay as it is, it just finishes with an incomplete statement that is expected to be completed properly later in the translation unit, yet never is.
Edit: After looking again, I think Fruny's assessment is more likely (error starts at a high line count and has repeatedly similar errors). I'm not sure why the types wouldn't be defined though, unless one of the headers you are including has an annoying requirement of including another file prior.
Edit: After looking again, I think Fruny's assessment is more likely (error starts at a high line count and has repeatedly similar errors). I'm not sure why the types wouldn't be defined though, unless one of the headers you are including has an annoying requirement of including another file prior.
There are type definitions it does not find, and thus it is complaining about defining variables of those types.
Then just exclude those 2 files from your project, I don't think you would need some stuff from the winxpsp2 sdk?
Turns out I didn't have to exclude any files after all, I figured that since I originally made my game project in Visual Studio 6.0 and imported it to Visual Studio 2005 it must have had different compiler settings than the defaults. It did. I just compared the two command lines in the projects and they were really different so I fixed up the discrepancies and it compiled fine!
Thanks for your help everyone!
Thanks for your help everyone!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement