Compile TGE 1.4 with VS 2005 Beta 2
by Steven Beasley · 10/16/2005 (7:34 am) · 3 comments
This is my first resource, so please forgive me if it isn't all that useful, but to me it was, so hopefully it will be useful to others as well.
First, there are a few things that have been mentioned around the forums on how to do this. This is the simplest way to compile a debug or release version of the latest 1.4 TGE.
1. Open the VC7 solution, and convert it to VC8
2. This will hopefully get fixed, as it looks to be an actual error, so if in future releases it is corrected then disregard this step, it's also odd that it the app would crash do to an error line 747, like the plane, so let's get this fixed, because we don't want any 747's crashing
DTSShape.cpp at line 747
Change line 747 to
3. In the Source Explorer. Right Click on Torque Demo --> Properties
Go to Configuration Properties --> C/C++ --> Language
Find the property titled Treat wchar_t as Built-in Type and change it to No (/Zc:wchar_t-)
Make sure you hit Apply before Ok
4. In the Source Explorer. Drill down into Torque Demo --> Source Files and find TorqueDemo.rc
Right click and choose View Code
TorqueDemo.rc at Line 3
Change To:
Important: Once you are finished with this file, close the file in the main window, and then double click on the TorqueDemo.rc file to open it up in resource view. This will recompile the resource file, and it's an easy way to validate that you did this step correctly.
Note: Okay for some reason you may still get errors doing this method. For some reason Step 3 doesn't always take, and you must change it's value and recompile.
Note: This does not work with VC++ 2005 Express Beta
This works with TGE v1.4 RC 2 as of October 11, 2005
First, there are a few things that have been mentioned around the forums on how to do this. This is the simplest way to compile a debug or release version of the latest 1.4 TGE.
1. Open the VC7 solution, and convert it to VC8
2. This will hopefully get fixed, as it looks to be an actual error, so if in future releases it is corrected then disregard this step, it's also odd that it the app would crash do to an error line 747, like the plane, so let's get this fixed, because we don't want any 747's crashing
DTSShape.cpp at line 747
void Shape::setSmallestSize(int pixels)
{
if (pixels < 1) pixels = 1 ;
smallestSize = pixels ;
for (int i = 0 ; i < detailLevels.size() ; i++) [b]<-- Line 747[/b]
{
if (detailLevels[i].size < pixels)
break ;
}
smallestDetailLevel = i ; //[b] Error is here, because the variable i is now out of scope[/b]
}Change line 747 to
int i ; for (i = 0 ; i < detailLevels.size() ; i++)
3. In the Source Explorer. Right Click on Torque Demo --> Properties
Go to Configuration Properties --> C/C++ --> Language
Find the property titled Treat wchar_t as Built-in Type and change it to No (/Zc:wchar_t-)
Make sure you hit Apply before Ok
4. In the Source Explorer. Drill down into Torque Demo --> Source Files and find TorqueDemo.rc
Right click and choose View Code
TorqueDemo.rc at Line 3
#include "resource.h"
Change To:
#include "../engine/game/resource.h"
Important: Once you are finished with this file, close the file in the main window, and then double click on the TorqueDemo.rc file to open it up in resource view. This will recompile the resource file, and it's an easy way to validate that you did this step correctly.
Note: Okay for some reason you may still get errors doing this method. For some reason Step 3 doesn't always take, and you must change it's value and recompile.
Note: This does not work with VC++ 2005 Express Beta
This works with TGE v1.4 RC 2 as of October 11, 2005
#2
EDIT: Bah, just noticed where it says wont work with express. Ah well, sounds like a good excuse to spend some money :)
10/19/2005 (5:58 pm)
Wow, how weird. I just tried to compile on vs2005 and failed not even 5 mins ago. I come on GG and here it is :) Nice job.EDIT: Bah, just noticed where it says wont work with express. Ah well, sounds like a good excuse to spend some money :)
#3
They did a pretty good job with it, so I didn't feel the need to rehash it here. Most of the problem is that VC++ Express doesn't come with the Platform SDK, you have to install it, and such. The best one to follow is near the bottom by a guy named Brian Gibson
10/20/2005 (10:41 am)
If you want it to compile under vs2005, you will want to do what I've done here, plus most of the stuff that is suggested here www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5957They did a pretty good job with it, so I didn't feel the need to rehash it here. Most of the problem is that VC++ Express doesn't come with the Platform SDK, you have to install it, and such. The best one to follow is near the bottom by a guy named Brian Gibson
Torque Owner Vashner