Problems with TGB compiled with VC++ 2005 Express
by Olli Sikstus · in Torque Game Builder · 10/10/2006 (5:23 am) · 15 replies
My program is running around 30 FPS with the tgb.exe that is included in the package. Now I compiled tgb.exe and tgb_debug.exe with VC++ 2005 Express. With new tgb.exe FPS drop somewhere around 20 and tgb_debug.exe crashes just after the level builder has started (application error about some breakpoint). I haven't modified the C++ sources in any way. Does any one else have same problems or have I done something wrong? I had no problems compiling TGB after I installed VC++ 2005 Express and Platform SDK.
About the author
#2
I managed to get around a similar problem by commenting out the "if ($runWithEditors)" in the initializeProject() function in my projects main.cs file. At this point I take control by calling my own script file.
As to why the debug config of the game does not like the default editor scripts, I don't know. Seems a bit odd that. :)
10/18/2006 (1:27 pm)
Regarding the crash with the debug build and VC++2005 Express:I managed to get around a similar problem by commenting out the "if ($runWithEditors)" in the initializeProject() function in my projects main.cs file. At this point I take control by calling my own script file.
As to why the debug config of the game does not like the default editor scripts, I don't know. Seems a bit odd that. :)
#3
Failed to open "main.cs"
then I click on OK and another info box pops up with this:
Failed to initialize game, shutting down.
Any ideas? Any kind of help would be greatly appreciated.
Thanks for reading.
11/30/2006 (4:26 pm)
I will state my problem as simply as I can. I have not made any changes to the TGB source code or to MSVC++ Express. I have been through the tutorial on this site about setting up and building TGB_DEBUG.exe using MSVC++ Express many times, being very careful that I follow each step to the letter. Here is where I am at. I get a clean build of TGB_DEBUG.exe and TGB.exe. with MSVC++ Express. When I choose run program, either with or without the debugger, I get a small error box that simply states:Failed to open "main.cs"
then I click on OK and another info box pops up with this:
Failed to initialize game, shutting down.
Any ideas? Any kind of help would be greatly appreciated.
Thanks for reading.
#4
11/30/2006 (4:44 pm)
Is there a main.cs in the same directory as the executable you're running? Open the directory and verify it visually.
#5
Visual Studio saves this in the user specific options file, which is why we don't ship with it already set.
11/30/2006 (5:23 pm)
You need to set the working directory. In Visual Studio, go to Project->T2D Properties... In the 'Configuration' drop down, select "All Configurations." Then under Configuration Properties->Debugging, enter ../../../games in the working directory section.Visual Studio saves this in the user specific options file, which is why we don't ship with it already set.
#6
11/30/2006 (7:31 pm)
You don't need to actually enter the path. Just set the WD to $(TargetDir) and the path gets set automatically to wherever the .exe is built to.
#7
11/30/2006 (11:22 pm)
Yes adam, main.cs is in my games directory. Adam, your solution worked! Thank you very much for your help. Tom, I am going to try your solution shortly. I will let you know - and to all a big thanks!
#8
And also I do not know what you mean when you say $(TargetDir)
Where do I set this targetDir - in Windows or in MSVC++?v I am very green when it comes to TGB source code and MSVC++. Please do not assume that I understand something that is probably simple to you. Do not take anything for granted. I must appologize for being a "newbie". Sorry, and Thank you.
12/01/2006 (11:56 am)
Tom, cold you explain in more detail how I would set the WD(Also, I do not know what you mean by "WD")And also I do not know what you mean when you say $(TargetDir)
Where do I set this targetDir - in Windows or in MSVC++?v I am very green when it comes to TGB source code and MSVC++. Please do not assume that I understand something that is probably simple to you. Do not take anything for granted. I must appologize for being a "newbie". Sorry, and Thank you.
#9
12/01/2006 (11:57 am)
I meant do exactly the same as what Adam said except use $(TargetDir) instead of typing the path
#10
I try to compile torque gamebuilder pro and i get this error can some one please help me
c:\program files\torquegamebuilderpro\engine\lib\directx8\d3d.h(23) : fatal error C1083: Cannot open include file: 'objbase.h': No such file or directory
glu2d3d.cc
c:\program files\torquegamebuilderpro\engine\lib\directx8\d3d.h(23) : fatal error C1083: Cannot open include file: 'objbase.h': No such file or directory
c:\program files\torquegamebuilderpro\engine\source\platformwin32\platformwin32.h(21) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
winVideo.cc
c:\program files\torquegamebuilderpro\engine\source\platformwin32\platformwin32.h(21) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
winV2Video.cc
04/23/2007 (8:38 pm)
Hello everyone - I gots a problem with VS Express installed, VS 2005 C++I try to compile torque gamebuilder pro and i get this error can some one please help me
c:\program files\torquegamebuilderpro\engine\lib\directx8\d3d.h(23) : fatal error C1083: Cannot open include file: 'objbase.h': No such file or directory
glu2d3d.cc
c:\program files\torquegamebuilderpro\engine\lib\directx8\d3d.h(23) : fatal error C1083: Cannot open include file: 'objbase.h': No such file or directory
c:\program files\torquegamebuilderpro\engine\source\platformwin32\platformwin32.h(21) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
winVideo.cc
c:\program files\torquegamebuilderpro\engine\source\platformwin32\platformwin32.h(21) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
winV2Video.cc
#11
Since it can not find the windows.h; either you do not have the Windows SDK installed and have no setup up your project tools in VS C++2005.
06/02/2007 (5:58 am)
Hey, Dennis..Since it can not find the windows.h; either you do not have the Windows SDK installed and have no setup up your project tools in VS C++2005.
#13
I recently got into torque, Compiling the TGB1.5.1 source using VS7.1. I having this nasty crash after I compile the source without any modifications.. I cant get to run the TGBGame.exe, I understand that there are two projects; one creating TorqueGameBuilder. exe and the other TGBGame.exe..
details of the crash: When I run the TGBGame.exe, it exits saying "initializeProject function could not be found indicating bad/corrupt common directory for your game"...
I tried what Tom suggested using $(TargetDir) as the WD, but in vain.. Need some guidance...
Thanks,
Sharath
11/15/2007 (8:17 pm)
Hi,I recently got into torque, Compiling the TGB1.5.1 source using VS7.1. I having this nasty crash after I compile the source without any modifications.. I cant get to run the TGBGame.exe, I understand that there are two projects; one creating TorqueGameBuilder. exe and the other TGBGame.exe..
details of the crash: When I run the TGBGame.exe, it exits saying "initializeProject function could not be found indicating bad/corrupt common directory for your game"...
I tried what Tom suggested using $(TargetDir) as the WD, but in vain.. Need some guidance...
Thanks,
Sharath
#14
I recently got into torque, Compiling the TGB1.5.1 source using VS7.1. I having this nasty crash after I compile the source without any modifications.. I cant get to run the TGBGame.exe, I understand that there are two projects; one creating TorqueGameBuilder. exe and the other TGBGame.exe..
details of the crash: When I run the TGBGame.exe, it exits saying "initializeProject function could not be found indicating bad/corrupt common directory for your game"...
I tried what Tom suggested using $(TargetDir) as the WD, but in vain.. Need some guidance...
Thanks,
Sharath
11/15/2007 (11:55 pm)
Hi ,I recently got into torque, Compiling the TGB1.5.1 source using VS7.1. I having this nasty crash after I compile the source without any modifications.. I cant get to run the TGBGame.exe, I understand that there are two projects; one creating TorqueGameBuilder. exe and the other TGBGame.exe..
details of the crash: When I run the TGBGame.exe, it exits saying "initializeProject function could not be found indicating bad/corrupt common directory for your game"...
I tried what Tom suggested using $(TargetDir) as the WD, but in vain.. Need some guidance...
Thanks,
Sharath
#15
11/16/2007 (6:15 pm)
You can't just open up TGBGame.exe because it tries to launch the game in the file's directory. So, you need it in a project directory. If you create a new project, put the exe in there and it does not work, then you have problems.
Torque 3D Owner Marc Dreamora Schaerer
Gayasoft
Change the configuration to release and build it again, that solves the problem.