Game Development Community

Tgea 1.7.1 - Torque_shipping Building In Vs2005

by Fyodor -bank- Osokin · in Torque Game Engine Advanced · 08/18/2008 (12:20 pm) · 2 replies

Not confirmed on another versions of VS, but on VS2005(Version 8.0.50727.762) I get errors when trying building TGEA 1.7.1 with TORQUE_SHIPPING defined. Lots of errors appears in interiorDebug.cpp file.

These errors appears because in interior.h file, the debug rendering functions are closed with ifndef but in corresponding .cpp file the #ifndef TORQUE_SHIPPING is put on top of file before all includes, so I think VS just have no info about it (no torque_config.h loaded, so no define exists yet).
Two ways of fixing:
1.
Add on top if file (before #ifndef TORQUE_SHIPPING) the following:
#include source/torqueConfig.h
--- OR ---
Here is a unified diff/patch for another, I think more correct, way (moving the ifndef after includes):
Index: engine/source/interior/interiorDebug.cpp
===================================================================
--- engine/source/interior/interiorDebug.cpp
+++ engine/source/interior/interiorDebug.cpp
@@ -4,7 +4,6 @@
 //-----------------------------------------------------------------------------
 // Conversion to TSE by Brian Richardson (bzzt@knowhere.net)
 
-#ifndef TORQUE_SHIPPING
 
 #include "interior/interior.h"
 #include "interior/interiorInstance.h"
@@ -22,6 +21,7 @@
 #include SHADER_CONSTANT_INCLUDE_FILE
 #include "renderInstance/renderInstMgr.h"
 
+#ifndef TORQUE_SHIPPING
 static U8 interiorDebugColors[14][3] = {
    { 0xFF, 0xFF, 0xFF },
    { 0x00, 0x00, 0xFF },
Now you can build your shipping binary!

#1
08/18/2008 (12:26 pm)
And, you will need to add:
#include "platformWin32\dxVersionChecker.h"
to dxVersionChecker.cpp and in gfxPCD3D9Device.cpp file in includes section, so it compiles finally.
Not sure what happens, but at first I got compiler error for dxVersionChecker.cpp... but after another rebuild, it went fine but gave error in another file. So I added in both :)
#2
08/22/2008 (3:26 pm)
Thanks for that catch =)