Game Development Community

Tank with TGE1.4w/TLK

by Stephen · in Torque Game Engine · 08/22/2006 (10:42 pm) · 9 replies

I'm not sure if anyone has ran into this problem because I haven't found anything on the forums about this problem.

I'm using TGE 1.4 w/ TLK and used this thread "Tank Pack and TGE 1.4" to add the tank pack to the engine. But when compiling with Visual Studio 2005 this error showed up.

tankShape.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TankShape::renderShadow(float,float)" (?renderShadow@TankShape@@UAEXMM@Z)
../example/torqueDemo.exe : fatal error LNK1120: 1 unresolved externals

I did get the tank pack working with TGE 1.4 w/o TLK but now with TLK I ran into this problem.

Thanks,
-Tek0

#1
08/23/2006 (8:43 pm)
So I'm guessing no one has tried getting the tank pack working with TLK?
#2
08/24/2006 (12:43 am)
Yeah I got it working though it was a long time ago. I do remember getting the same error message but can't quite remember how I fixed it. I think it was just a matter of declaring something in the public class as opposed to the private class.
#3
08/24/2006 (10:35 pm)
This don't really help me but maybe you could help me?
#4
08/25/2006 (1:36 am)
I'm busy at the moment but I will dig out the tank pack tonight and get it installed to TLK 1.4.

I'll post what you need to do later on.
#5
08/26/2006 (8:02 am)
tankShape.h

Near bottom of file, around line 487, find this line:
void renderShadow(F32 dist, F32 fogAmount);

Directly underneath it add this:
bool prepRenderImage(SceneState* state, const U32 stateKey, const U32 startZone, const bool modifyBaseZoneState);

Problem solved.

- Tim
#6
08/26/2006 (11:34 am)
After adding your fix I'm getting this when trying to compile.

Linking...
tankShape.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall TankShape::prepRenderImage(class SceneState *,unsigned int,unsigned int,bool)" (?prepRenderImage@TankShape@@UAE_NPAVSceneState@@II_N@Z)
tankShape.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TankShape::renderShadow(float,float)" (?renderShadow@TankShape@@UAEXMM@Z)
../example/torqueDemo.exe : fatal error LNK1120: 2 unresolved externals
Build log was saved at "file://c:\Torque\SDK\engine\out.VC8.RELEASE\BuildLog.htm"
Torque Demo - 3 error(s), 0 warning(s)

Btw, I'm using Visual Studio 2005 if that matters.

EDIT
I just commented out "void renderShadow(F32 dist, F32 fogAmount);" and it compiled and I added the tank ingame and it works but by doing this is it bad?
#7
08/26/2006 (11:46 am)
Check shapeBase.h at around line 1522 and make sure this line is in there:
virtual void renderShadow(F32 dist, F32 fogAmount);

Also, check wheeledVehicle.h and see how that file handles the same situation then replicate it in tankShape.h.

I'm using vc6 and it compiles fine for me. I don't compile Torque with VS so if that's what's causing the problem I can be of no further help.

Perhaps try contacting John Kabus or BraveTree.
#8
08/26/2006 (11:49 am)
Quote:
I just commented out "void renderShadow(F32 dist, F32 fogAmount);" and it compiled and I added the tank ingame and it works but by doing this is it bad?
Are you still seeing a shadow from the tank?
#9
08/26/2006 (12:22 pm)
Well I looked at shapeBase.h and wheeledvehicle.h and noticed that in both files it has "// Lighting Pack code block" around

void renderShadow(F32 dist, F32 fogAmount);
   bool prepRenderImage(SceneState* state, const U32 stateKey, const U32 startZone, const bool modifyBaseZoneState);

So then I looking over the wheeledvehicle.h to find out where that code is located. And I move that code up farther in the tankShape.h and I got it to compile and working great. So basicly what I did is move the rendershadow to LIne 328 and add the prepRenderImage and it compiled with no errors.

Thankyou very for your help!