I can't touch my program without causing errors

Started by
16 comments, last by escudo825 18 years, 2 months ago
I found another problem. now it's saying that it can't find ddutil.h one time, and that's the only error. but if I put it somewhere that it can find it then I get 102 errors, whether I put it in the same file or in the include file. so is it now down to a directX problem?
Advertisement
It's not so much the quantity of errors that matters as it is what they have to say. For example, that 1 error you had before (can't find ddutil.h) was potentially hiding an unlimited number of errors that would result from how you are using ddutil.h.

It would probably help if you posted what the compile errors are. Not a complete list; just a sampling would do.
Jetblade: an open-source 2D platforming game in the style of Metroid and Castlevania, with procedurally-generated levels
Out of curiousity, what are the error messages you're getting?
If at first you don't succeed, call it version 1.0You don't stop playing because you get old; you get old when you stop playing.
here are the first 3:

   spriteanimate.cpp(47) : error C2143: syntax error : missing ';' before '*'spriteanimate.cpp(47) : error C2501: 'CDisplay' : missing storage-class or type specifiersspriteanimate.cpp(47) : error C2501: 'g_pDisplay' : missing storage-class or type specifiers


and this is the line that is the problem:

   CDisplay*            g_pDisplay          = NULL;


then I have acouple of other lines that have afew errors each and one line that has about 90 errors. but I'll save those until I get the first few solved just in case that takes care of them.

[edit] I just took a good look at the error list and noticed that most of them were saying a semicolon was missing from where it shouldn't be, what could cause this?

[edit2] I narrowed a majority of the semicolon errors to one line, and it was in a check to see if the computer supported 640x480x16. I don't see how a computer still alive that's in regular use couldn't support this so I commented it out and I now have only 22 errors and 1 warning. and most of them are more like the example above.
Check the declaration for the CDisplay class, look for spelling or capitalisation differences, or a field/method missing a type specifier.

[google]

If at first you don't succeed, call it version 1.0You don't stop playing because you get old; you get old when you stop playing.
Just in case you are curious, the most likely reason that it compiles fine before you make any changes is because you have copied some sort of database files along with the rest of the project which show that none of the files in the project are out of date. Hence when you click build, it detects that nothing actually needs to be recompiled, and just says that the build was successful. Adding any change, even whitespace, would cause the file to go 'out of date' and need to be recompiled.

With regard to the errors you are getting, the compiler is for some reason not aware that CDisplay is a type. You are probably either not including the header that declares it, or there is a problem with the declaration itself. Based on the number of errors you are getting, I would guess that the problem lies in the header itself, and that the header is generating errors for every cpp file that includes it.
Quote:Original post by 0xCHAOS
Just in case you are curious, the most likely reason that it compiles fine before you make any changes is because you have copied some sort of database files along with the rest of the project which show that none of the files in the project are out of date. Hence when you click build, it detects that nothing actually needs to be recompiled, and just says that the build was successful. Adding any change, even whitespace, would cause the file to go 'out of date' and need to be recompiled.

With regard to the errors you are getting, the compiler is for some reason not aware that CDisplay is a type. You are probably either not including the header that declares it, or there is a problem with the declaration itself. Based on the number of errors you are getting, I would guess that the problem lies in the header itself, and that the header is generating errors for every cpp file that includes it.
Bingo! That will indeed be what is happening. I was about to say the same myself. You probably copied the .obj files across and it's simply linking those when you build.
The most likely explanation as to why your project wont build any more is that it's missing some includes. In fact, the DX8a sdk might not even be installed!
"In order to understand recursion, you must first understand recursion."
My website dedicated to sorting algorithms
okay I'll look into CDisplay. but I have someone that works with directX 8 that sits nearby and it always works with him, I asked him and he couldn't find any problems. oh well I'll have to learn some how.

[edit] shouldn't it compile fine a long as the pc has at least that version of directX? and is there a way to remove these .obj files so they don't interfere?

[Edited by - escudo825 on February 9, 2006 3:05:46 PM]

This topic is closed to new replies.

Advertisement