Game Development Community

Compiling iTGB 1.2 in VS2008

by baylor wetzel · in iTorque 2D · 07/19/2009 (9:38 am) · 2 replies

iTGB frequently locks up my machine and the very good suggestion was made that, since i have the source, i should recompile and see what happens. Problem is, when i try compiling either TGBGame or TorqueGameBuilder, i get 54 linker errors

i'm following the instructions i wrote for myself to compile 1.7.4 (which is based on the various TDN posts), which include the big 3 problems with compiling TGB (turn off "Treat wchar_t as Built-in Type", set _WIN32_WINNT 0x0400 to 0x0501 and replace "afxres.h" with "windows.h"). This compiler has compiled TGB so it has all the proper platform SDK paths setup. i don't remember seeing this linking problem before in TGB and didn't see anything for TGB or iTGB when i did a forum search so i'm wondering if it's iTGB specific

The errors come from different files - consoleFunctions, simBase, t2dImageMapDatablock, t2dTrigger, compiledEval, consoleInternal, etc.

Sample errors:

error LNK2001: unresolved external symbol "public: struct Namespace::Entry * __thiscall Namespace::lookup(char const *)" (?lookup@Namespace@@QAEPAUEntry@1@PBD@Z) consoleFunctions.obj

error LNK2019: unresolved external symbol "public: struct Namespace::Entry * __thiscall Namespace::lookup(char const *)" (?lookup@Namespace@@QAEPAUEntry@1@PBD@Z) referenced in function "public: char const * __thiscall ConsoleObject::getClassName(void)const " (?getClassName@ConsoleObject@@QBEPBDXZ) simBase.obj

error LNK2019: unresolved external symbol "public: static class Namespace * __cdecl Namespace::global(void)" (?global@Namespace@@SAPAV1@XZ) referenced in function "public: bool __thiscall t2dImageMapDatablock::compileImageMap(void)" (?compileImageMap@t2dImageMapDatablock@@QAE_NXZ) t2dImageMapDatablock.obj

error LNK2019: unresolved external symbol "unsigned int __cdecl tDictionaryHash::nextPrime(unsigned int)" (?nextPrime@tDictionaryHash@@YAII@Z) referenced in function "private: void __thiscall tHashTable<unsigned int,class t2dSceneObject *>::_resize(unsigned int)" (?_resize@?$tHashTable@IPAVt2dSceneObject@@@@AAEXI@Z) t2dTrigger.obj

error LNK2001: unresolved external symbol "public: static class Namespace * __cdecl Namespace::find(char const *,char const *)" (?find@Namespace@@SAPAV1@PBD0@Z) compiledEval.obj

error LNK2019: unresolved external symbol "public: __thiscall Dictionary::Dictionary(class ExprEvalState *,class Dictionary *)" (??0Dictionary@@QAE@PAVExprEvalState@@PAV0@@Z) referenced in function "public: void __thiscall ExprEvalState::pushFrame(char const *,class Namespace *,int)" (?pushFrame@ExprEvalState@@QAEXPBDPAVNamespace@@H@Z) consoleInternal.obj

error LNK2019: unresolved external symbol "public: void __thiscall Namespace::getEntryList(class Vector<struct Namespace::Entry *> *)" (?getEntryList@Namespace@@QAEXPAV?$Vector@PAUEntry@Namespace@@@@@Z) referenced in function "void __cdecl cSimObjectdump(class SimObject *,int,char const * *)" (?cSimObjectdump@@YAXPAVSimObject@@HPAPBD@Z) simBase.obj

#1
07/19/2009 (11:11 am)
I followed this tutorial and don't have any issues.

http://tdn.garagegames.com/wiki/TGB/Setting_up_Compiler

Do a full batch build in the beginning.
#2
07/19/2009 (8:31 pm)
I had to include some missing files under TorqueGameBuilder\Source Files\console

-Dictionary.cc + .h
-Namespace.cc + .h

and (I think)
-tHashTable.cc + .h

did the same thing for the TGBGame project