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.

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?

0

Share this post

Link to post

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 this post

Link to post

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!