compiling compilcations
by Greg Cate · in Game Mechanics Kit · 08/22/2009 (8:23 pm) · 10 replies
I just downloaded the gmk 1_2_2, and tried to compile it with T3d beta 4. I first compiled a new copy of beta 4 (I had no errors) then , following the directions, added the files from gmk to the engine and game file - with the exception of the bullet and physX folders found in gmk's engine\source\T3D\logickingMechanics. I have repeated the procedure several times and must be doing something fundamentally wrong. I am hoping that someone has run across this and can help me get back on track.
These are the errors that I receive after compiling:
Error 55 error LNK2001: unresolved external symbol "public: static class Physics * __cdecl Physics::getPhysics(bool)" (?getPhysics@Physics@@SAPAV1@_N@Z) interiorInstance.obj
Error 56 error LNK2001: unresolved external symbol "public: static class Physics * __cdecl Physics::getPhysics(bool)" (?getPhysics@Physics@@SAPAV1@_N@Z) terrData.obj
Error 57 error LNK2019: unresolved external symbol "public: static class Physics * __cdecl Physics::getPhysics(bool)" (?getPhysics@Physics@@SAPAV1@_N@Z) referenced in function "protected: virtual void __thiscall ClientProcessList::advanceObjects(void)" (?advanceObjects@ClientProcessList@@MAEXXZ) gameProcess.obj
Error 58 error LNK2001: unresolved external symbol "public: static class Physics * __cdecl Physics::getPhysics(bool)" (?getPhysics@Physics@@SAPAV1@_N@Z) staticShape.obj
Error 59 error LNK2001: unresolved external symbol "public: static class Physics * __cdecl Physics::getPhysics(bool)" (?getPhysics@Physics@@SAPAV1@_N@Z) tsStatic.obj
Error 60 error LNK2001: unresolved external symbol "public: static class Physics * __cdecl Physics::getPhysics(bool)" (?getPhysics@Physics@@SAPAV1@_N@Z) guiTSControl.obj
Error 61 fatal error LNK1120: 1 unresolved externals ../../../game/FPS Genre Kit.dll
These are the errors that I receive after compiling:
Error 55 error LNK2001: unresolved external symbol "public: static class Physics * __cdecl Physics::getPhysics(bool)" (?getPhysics@Physics@@SAPAV1@_N@Z) interiorInstance.obj
Error 56 error LNK2001: unresolved external symbol "public: static class Physics * __cdecl Physics::getPhysics(bool)" (?getPhysics@Physics@@SAPAV1@_N@Z) terrData.obj
Error 57 error LNK2019: unresolved external symbol "public: static class Physics * __cdecl Physics::getPhysics(bool)" (?getPhysics@Physics@@SAPAV1@_N@Z) referenced in function "protected: virtual void __thiscall ClientProcessList::advanceObjects(void)" (?advanceObjects@ClientProcessList@@MAEXXZ) gameProcess.obj
Error 58 error LNK2001: unresolved external symbol "public: static class Physics * __cdecl Physics::getPhysics(bool)" (?getPhysics@Physics@@SAPAV1@_N@Z) staticShape.obj
Error 59 error LNK2001: unresolved external symbol "public: static class Physics * __cdecl Physics::getPhysics(bool)" (?getPhysics@Physics@@SAPAV1@_N@Z) tsStatic.obj
Error 60 error LNK2001: unresolved external symbol "public: static class Physics * __cdecl Physics::getPhysics(bool)" (?getPhysics@Physics@@SAPAV1@_N@Z) guiTSControl.obj
Error 61 fatal error LNK1120: 1 unresolved externals ../../../game/FPS Genre Kit.dll
About the author
#2
Also, I will be emailing you about the link to update to GMK 1.2.3.
Thanks for your time and patience.
08/23/2009 (4:38 pm)
Thanks for responding Yuri. I did have these two files include; however, just to make sure that that was not an error I recopied and replaced them. After rebuild solution, I recieved the same errors.Also, I will be emailing you about the link to update to GMK 1.2.3.
Thanks for your time and patience.
#3
I've sent you a link to 1.2.3 by email.
Please check that lines of physics definitions in T3D\engine\source\T3D\logickingMechanics\physics\physics.h commented as follows:
//#define PHYSICS_BULLET
//#define PHYSICS_PHYSX
And if this not help. I've noticed that you were using FPS starting kit, could you please try it with newly generated project from Torque Toolbox.
08/24/2009 (3:21 pm)
Hi Greg,I've sent you a link to 1.2.3 by email.
Please check that lines of physics definitions in T3D\engine\source\T3D\logickingMechanics\physics\physics.h commented as follows:
//#define PHYSICS_BULLET
//#define PHYSICS_PHYSX
And if this not help. I've noticed that you were using FPS starting kit, could you please try it with newly generated project from Torque Toolbox.
#4
Sorry for the delay, I was trying out another idea but it too gave the same results. So, to cover what I've tried since your last suggestion,
I have created and compiled a new t3d beta5 project. And I have compiled it using VS2008 Express; also, I compiled another new project using a trial version of VS2008 so that I did not need to remove the IE Project Name Plugin for it to be able to compile. Both versions gave me the same errors as before. I did check physics.h and physics.cpp and they appear to be defined OK.
On a less frustrating note, I created yet another program and used your compiled gmk.exe, and it works....except the triggers. I'm still trying to figure out why, when I get a "mouse-over hand", that I still get gun fire when clicked upon instead of the trigger being activated.
Greg
08/27/2009 (10:11 pm)
Hi Yuri,Sorry for the delay, I was trying out another idea but it too gave the same results. So, to cover what I've tried since your last suggestion,
I have created and compiled a new t3d beta5 project. And I have compiled it using VS2008 Express; also, I compiled another new project using a trial version of VS2008 so that I did not need to remove the IE Project Name Plugin for it to be able to compile. Both versions gave me the same errors as before. I did check physics.h and physics.cpp and they appear to be defined OK.
On a less frustrating note, I created yet another program and used your compiled gmk.exe, and it works....except the triggers. I'm still trying to figure out why, when I get a "mouse-over hand", that I still get gun fire when clicked upon instead of the trigger being activated.
Greg
#5
check what you did here:
Project Properties->Linker->Input->Additional Dependencies
sounds like you erred in the way you did the additions
BTW, are you targeting for physx or bullet?
08/28/2009 (7:50 am)
@Greg,check what you did here:
Project Properties->Linker->Input->Additional Dependencies
sounds like you erred in the way you did the additions
BTW, are you targeting for physx or bullet?
#6
I started over again with a clean copy of Beta 5 - then created a new project. I loaded/copied all of the files from GMK into the engine and game folders (with the exception of the bullet and physx folders found in the T3D/LogickingMechanics/physics folders. Then I compiled, as per instructed - this is the step before adding any physics. I still received the same error messages.
I have also tried to add bullet (both versions at different times), and still receive the same error messages. Therefore, I think that it must be something that I have forgot to do or don't know to do in the first few steps.
Any ideas would be appreciated.
08/29/2009 (1:59 am)
Deepscratch,I started over again with a clean copy of Beta 5 - then created a new project. I loaded/copied all of the files from GMK into the engine and game folders (with the exception of the bullet and physx folders found in the T3D/LogickingMechanics/physics folders. Then I compiled, as per instructed - this is the step before adding any physics. I still received the same error messages.
I have also tried to add bullet (both versions at different times), and still receive the same error messages. Therefore, I think that it must be something that I have forgot to do or don't know to do in the first few steps.
Any ideas would be appreciated.
#7
I had the same problem. But there is a problem with VisualStuido. There are a few solutions for this link error.
Here is a list of reasons and possible solutions
/////////////////////////////////////
// 1.prepare the environment
//
1.a) VisualStudio does not update preferences for include and lib folders. I don't know the reason. It might be Torque resetting the changes in your project properties. So, that means you have to enter them everytime you want to rebuild Torque.
1.b) Direct your bullet library files individually in the Properties/Linker/Input section.
1.c) The GMK package comes with an extra logickingMechanics folder.
Add them to your project. Right click the "FPS Genre Kit Dll(or YourProjectName DLL)". Create the logickingMechanics folder structure in T3D add the items to related folders with "Add Existing Items"
//
/////////////////////////////////////
/////////////////////////////////////
// 2.analyse the error
//
2.Check out the file(s) reported in the error. Here is one of your errors
Error 56 error LNK2001: unresolved external symbol "public: static class Physics * __cdecl Physics::getPhysics(bool)" (?getPhysics@Physics@@SAPAV1@_N@Z) terrData.obj
There is an error in terrData.cpp file
Problem is the Physics object. Search through your project files with a class named Physics. Here it is most probably logickingMechanics/physics/physics.cpp file.
There you have those two files : terraData.cpp & physics.cpp
Open cpp files
Press Ctrl+F7 (or from Build/Compile)
Sometimes it works.
//
/////////////////////////////////////
/////////////////////////////////////
// 3.build the project
//
3.Choose the release version. Build only the DLL project( MyGameProject DLL) because it takes 2-3 minutes shorter.
//
/////////////////////////////////////
And... Voila!!!
Good Luck :)
08/31/2009 (8:04 am)
@GregI had the same problem. But there is a problem with VisualStuido. There are a few solutions for this link error.
Here is a list of reasons and possible solutions
/////////////////////////////////////
// 1.prepare the environment
//
1.a) VisualStudio does not update preferences for include and lib folders. I don't know the reason. It might be Torque resetting the changes in your project properties. So, that means you have to enter them everytime you want to rebuild Torque.
1.b) Direct your bullet library files individually in the Properties/Linker/Input section.
1.c) The GMK package comes with an extra logickingMechanics folder.
Add them to your project. Right click the "FPS Genre Kit Dll(or YourProjectName DLL)". Create the logickingMechanics folder structure in T3D add the items to related folders with "Add Existing Items"
//
/////////////////////////////////////
/////////////////////////////////////
// 2.analyse the error
//
2.Check out the file(s) reported in the error. Here is one of your errors
Error 56 error LNK2001: unresolved external symbol "public: static class Physics * __cdecl Physics::getPhysics(bool)" (?getPhysics@Physics@@SAPAV1@_N@Z) terrData.obj
There is an error in terrData.cpp file
Problem is the Physics object. Search through your project files with a class named Physics. Here it is most probably logickingMechanics/physics/physics.cpp file.
There you have those two files : terraData.cpp & physics.cpp
Open cpp files
Press Ctrl+F7 (or from Build/Compile)
Sometimes it works.
//
/////////////////////////////////////
/////////////////////////////////////
// 3.build the project
//
3.Choose the release version. Build only the DLL project( MyGameProject DLL) because it takes 2-3 minutes shorter.
//
/////////////////////////////////////
And... Voila!!!
Good Luck :)
#8
I've checked your *.vcproj and found that there are no GMK files added at all.
Please make sure these files are in the project.
I've made a couple of screenshots to show you how do this.

09/02/2009 (8:29 am)
@GregI've checked your *.vcproj and found that there are no GMK files added at all.
Please make sure these files are in the project.
I've made a couple of screenshots to show you how do this.

#9
09/09/2009 (1:18 am)
Thanks guys!!!! I was able to get the files incorporated into VS2k8 with your help, and everything works as it should - awesome.
#10
09/11/2009 (8:01 am)
You are welcome, Greg!
Torque Owner Yuri Dobronravin
Logicking
First of all, you can have GMK 1.2.3 already for Beta 5. Please email me at logicking@logicking.comto get the download link.
Do you have T3D\logickingMechanics\physics\physics.h and T3D\logickingMechanics\physics\physics.cpp included in the project?