Game Development Community

types.h compile bug

by Xavier "eXoDuS" Amado · in Torque Game Engine · 07/10/2002 (12:12 pm) · 7 replies

Hey guys, after updating my game source code from head last night I started to have this compile warning:

../engine\platform/types.h(65) : warning C4005: 'PNG_NO_READ_TIME' : macro redefinition
unknown(0) : see previous definition of 'PNG_NO_READ_TIME'
../engine\platform/types.h(66) : warning C4005: 'PNG_NO_WRITE_TIME' : macro redefinition
unknown(0) : see previous definition of 'PNG_NO_WRITE_TIME'

Any ideas what might be wrong?! The game compiles, but with all those errors...

#1
07/10/2002 (12:18 pm)
What happens when you delete all of your old object code and then re-compile?
#2
07/10/2002 (12:46 pm)
Comment out line 65 and 66 in the types.h file for now and it will compile without all those warnings. I get 1175 warnings because of those 2 lines. 1 warning after I comment them out.

edit:
It would be nice to know why this happens.
#3
07/10/2002 (1:48 pm)
Just remove the conditional defines from your project settings. That'll clear up the problem.

-David
Samu Games
#4
07/10/2002 (3:37 pm)
Yes i did fix it for now commenting those 2 lines, but I really want to fix the real problem here :\
@David, what do you mean?
#5
07/10/2002 (4:14 pm)
In VC++, load up the Torque SDK workspace. On the Project menu, choose Settings.

Bring up the C/C++ tab, and edit "Preprocessor Definitions". Remove the 2 PNG_ defines that are there.

types.h is collecting all of the #define statements so that you can control the build from there, instead of having to change compiler settings.

-David
#6
07/10/2002 (6:29 pm)
And why this didnt affect me before? or was that a recent change to the workspace that my cvs failed to merge?
#7
07/11/2002 (7:27 am)
Changed yesterday or the night before. I noticed it, like you, when I did a build.

The merge didn't update my "Turbo SDK.opt" file because it's a binary file in CVS. I saw the conflict reported and just kept my eyes open for what must've changed. So far, I've only seen the preprocessor definition changes.

Hope that helps.

-David