Recompiling the source code with no luck
by Amjad Yahya · in Torque Game Builder · 12/06/2012 (7:56 am) · 7 replies
I needed to use a camera rotation method, because it does not exist, I had to change the source code according to this thread http://www.garagegames.com/community/forums/viewthread/29015. I used visual c++ 2005 express edition to recompile, that went smooth, and now I have a new build. The problem is that this new change in the code is not reflected, TGB does not recognize the method that I have added and keeps giving me errors.
Any thought guys?
Thanks.
Any thought guys?
Thanks.
About the author
#2
12/06/2012 (9:51 am)
Are you using the new binary?
#3
Check your TGB directory for TorqueGameBuilder_DEBUG.exe. If this file is there, build again but select Release for your build target. And while you're there you can run the debug executable to see if your changes took effect.
The same thing applies to games. Additionally, ensure that the new game executable is copied to your game project folder - this is NOT done by the build by default. You'll find the new build in <your TGB install location>\tgb\gameData\T2DProject.
12/06/2012 (11:54 am)
Release target builds an executable with the expected name, but a Debug build (selected in Visual Studio by default) appends _DEBUG to the executable file name.Check your TGB directory for TorqueGameBuilder_DEBUG.exe. If this file is there, build again but select Release for your build target. And while you're there you can run the debug executable to see if your changes took effect.
The same thing applies to games. Additionally, ensure that the new game executable is copied to your game project folder - this is NOT done by the build by default. You'll find the new build in <your TGB install location>\tgb\gameData\T2DProject.
#4
Richard, I have compiled a release build, but upon running TGB.exe it gave me this error: "An unhandled win32 exception occured in TorqueGameBuilder.exe [3820]. just-in-time debugging this exception failed with the following error: No installed debugger has Just-in-time debugging enabled. In Visual Studio, just-in-time debugging can be enabled from Tools/options/debugging/just-in-time."
That option does not exist in visual c++ 2005 express which I used to do the build, so for now I can't make a release build until I get the Visual Studio version.
On the other hand the debug build works fine except when I exit the application it gives an exception error which is really annoying. I just can't understand why should I copy TGBGame_Debug.exe to my project folder in order for the new changes to take effect? The changes did take effect in the debug version after I copied TGBGame_Debug.exe to my project folder! strange.
Alpha-Kand, rotating the camera did work but I got a very strange result, I've rotated the camera 180 degrees using sceneWindow2D.setCurrentCameraAngle(180); so I could get my scene up-side-down, but, although I see that all the objects are up-side-down they really are in the same place they where before I rotated the camera, the menu button on the lower-right corner after rotation is on the upper-left corner visually but when I click on it, it does not respond until I click on the lower-right corner where it was before rotation. I couldn't believe my eyes .. I have finally managed to rotate the camera but the disappointment was big when I discovered it did not work. So I guess we will have to wait for the next major update to see this happening.
12/07/2012 (2:20 am)
Thank you all.Richard, I have compiled a release build, but upon running TGB.exe it gave me this error: "An unhandled win32 exception occured in TorqueGameBuilder.exe [3820]. just-in-time debugging this exception failed with the following error: No installed debugger has Just-in-time debugging enabled. In Visual Studio, just-in-time debugging can be enabled from Tools/options/debugging/just-in-time."
That option does not exist in visual c++ 2005 express which I used to do the build, so for now I can't make a release build until I get the Visual Studio version.
On the other hand the debug build works fine except when I exit the application it gives an exception error which is really annoying. I just can't understand why should I copy TGBGame_Debug.exe to my project folder in order for the new changes to take effect? The changes did take effect in the debug version after I copied TGBGame_Debug.exe to my project folder! strange.
Alpha-Kand, rotating the camera did work but I got a very strange result, I've rotated the camera 180 degrees using sceneWindow2D.setCurrentCameraAngle(180); so I could get my scene up-side-down, but, although I see that all the objects are up-side-down they really are in the same place they where before I rotated the camera, the menu button on the lower-right corner after rotation is on the upper-left corner visually but when I click on it, it does not respond until I click on the lower-right corner where it was before rotation. I couldn't believe my eyes .. I have finally managed to rotate the camera but the disappointment was big when I discovered it did not work. So I guess we will have to wait for the next major update to see this happening.
#5
I'd also advise getting VC++ 2010 express.
As for why you have to copy the new executable to your project folder, if you're running from the editor using the Run button or the F5 short-cut then I'm not certain - I'd have to look at the scripts to see what's going on. It may be pointing at a different base folder.
12/07/2012 (5:34 am)
Debugging the release build is more difficult than debugging the debug build anyway - no symbol tables so it's almost impossible to tell what functions and variables you're looking at. When making source changes it's highly advisable to get it working by building the debug version and test until it works before making a release build. You'll save time and headaches that way, and that's why the option exists in the first place.I'd also advise getting VC++ 2010 express.
As for why you have to copy the new executable to your project folder, if you're running from the editor using the Run button or the F5 short-cut then I'm not certain - I'd have to look at the scripts to see what's going on. It may be pointing at a different base folder.
#6
BTW, I'm running the game from the editor using the Run button, but let me see if I get this right, suppose I just installed a clean copy of the game editor and I opened any project and hit the run button, the engine compiles the files and builds TGBGame.exe inside \tgb\gameData\T2DProject folder, then the engine gets minimized and TGBGame.exe gets executed without the need for TGBGame.exe to be copied to the project folder.. so far so good, then when I make a new build of TorqueGameBuilder.exe with some changes I don't get to see them unless I copy TGBGame.exe to the project folder and execute it, that's 2 additional steps after I hit run button every time?
BTW, I did have VS 2008 but I couldn't get it to work as described here: http://tdn.garagegames.com/wiki/TGB/Setting_up_Compiler.
12/07/2012 (6:33 am)
Thanks Richard for your quick response.BTW, I'm running the game from the editor using the Run button, but let me see if I get this right, suppose I just installed a clean copy of the game editor and I opened any project and hit the run button, the engine compiles the files and builds TGBGame.exe inside \tgb\gameData\T2DProject folder, then the engine gets minimized and TGBGame.exe gets executed without the need for TGBGame.exe to be copied to the project folder.. so far so good, then when I make a new build of TorqueGameBuilder.exe with some changes I don't get to see them unless I copy TGBGame.exe to the project folder and execute it, that's 2 additional steps after I hit run button every time?
BTW, I did have VS 2008 but I couldn't get it to work as described here: http://tdn.garagegames.com/wiki/TGB/Setting_up_Compiler.
#7
12/07/2012 (3:06 pm)
Alright then. That sounds like a funny but annoying problem to fix. I wish I could help with compiler set-up but I barely got mine to work. I need to look up what all those preferences and options mean so I can understand it and maybe get breakpoints to work.
Torque Owner Alpha-Kand
Hunter's Meadow
In the meantime could you post a couple of the error reports?