# Never seen this before...

This topic is 4996 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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.
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?

##### Share on other sites
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.

##### Share on other sites
There are type definitions it does not find, and thus it is complaining about defining variables of those types.

##### Share on other sites
Then just exclude those 2 files from your project, I don't think you would need some stuff from the winxpsp2 sdk?

##### Share on other sites
Sorry, I've tried looking, do any of you guys know how I can exclude a file from my project?

##### Share on other sites
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!

1. 1
2. 2
Rutin
25
3. 3
4. 4
5. 5

• 10
• 13
• 19
• 14
• 9
• ### Forum Statistics

• Total Topics
632942
• Total Posts
3009342
• ### Who's Online (See full list)

There are no registered users currently online

×