Game Development Community

dev|Pro Game Development Curriculum

Building Torque 1.4 on Visual Studio 2005 Professional and Express Editons

by Ray Gebhardt · 11/26/2005 (5:35 pm) · 63 comments

This resource has be replaced by this TDN article:
tdn.garagegames.com/wiki/Torque/vs2k5
Page «Previous 1 2 3 4 Last »
#1
11/25/2005 (4:24 am)
I got 1.4 from the installer working with the Express version of Visual Studio .NET 2005 tonight.

I had a bit of pain, but it was from not following instructions properly and not knowing much about linking libraries.

If you follow steps 1-4 above, and then as Noolness says, you download the platform SDK and then add the lib / include paths.

You can get the SDK here. I went and downloaded the PSDK-x86.exe file half way down that page, and went through the install (which then downloads the SDK). It was nearly a GB, so if your connection is not so hot, now would be a good time to make a coffee.

I'll just quote Matthew Fairfax's instructions (slightly edited) on what to do next.

Quote:Now we need to point Visual Studio at the files in the Platform Core SDK so that it can use them for compilation:

Goto Tools->Options. Expand "Projects and Solutions" on the left and click on "VC++ Directories"

Choose "Include files" from the "Show directories for:" drop down in the top right. Add these two entries (click on the folder looking button):
C:\Program Files\Microsoft SDK\Include
C:\Program Files\Microsoft SDK\Include\mfc

Choose "Library files" from the "Show directories for:" drop down in the top right. Add this entry (click on the folder looking button):
C:\Program Files\Microsoft SDK\Lib

Do that for both debug and release.

If you build now it may work ... it didn't for me, so I had to do this additional step.

Right click on Torque Demo in the solution explorer and choose properties. Select Linker > Input, and click on Additional Dependencies. I had to add in "User32.lib", "gdi32.lib" and "Advapi32.lib". After that it built fine for both debug and release.
#2
11/27/2005 (8:06 am)
Thanks for the Great information. I finally got 1.4 to compile!!!
#3
11/27/2005 (9:33 am)
Excellent info - I just upgraded to VS 2005 Pro and was having some issues.. it's all cleared up now!
#4
11/27/2005 (12:20 pm)
If you want to reduce the warning spewed out by VS 2005 about the deprecated use of the the C standard library functions (sprintf for example). Do the following steps:

Open up the properties of the project with the warnings (Go to Project in the Menu, the click on Properties).
Expand the Configuration Properties on the left. Then expand C/C++.
Now under C/C++ click on the Preprocessor.
Under "Preprocessor Definitons" at the top. Add the following _CRT_SECURE_NO_DEPRECATE . If there's more than one entry already in there be sure to add a semicolon before it.

e.g. UNICODE;TORQUE_DEBUG;_CRT_SECURE_NO_DEPRECATE

And compile and you shouldn't get any more of those warnings.

A bit of disclaimer, this simply hides the warnings - it doesn't remove the actual problem VC5 is complaining about. In this release of Visual C++ they've implimented what they believe to be a more secure C standard library, and they advise changing the c function calls apropriately.

- Eric
#5
11/27/2005 (4:43 pm)
Thanks VERY much for this. When I first built 1.4 on VS 2005 and noticed "Build: 4 succeeded, 11 failed", I almost started to panic. Then I took a deep breath and did a GG search on "1.4 Visual Studio 2005" and found your article.

I have the Express edition, I'll get the SDK and try it out now. Thanks again.

Question @ Vernon:
The link you have provided is for Windows Server 2003. Is this the standard SDK for VS 2005? Would I want to install this if I am on Windows XP?
#6
11/27/2005 (5:03 pm)
@Jeffrey - It'll say that it's for Windows Server 2003 - that's normal. Just make sure you get the correct installer for your correct architecture (most likely x86).

- Eric
#7
11/27/2005 (5:21 pm)
Thanks. I should have read the downlopad page more carefully before I asked. I am downloading the ISO version, that apparently supports all - x86, ia64, etc.
#8
11/28/2005 (11:03 am)
It would be very cool if someone could convert this resource to TDN - tdn.garagegames.com/wiki/Torque/BuildingOnVs2005 is a page that's good for it.
#9
11/28/2005 (11:08 am)
I just got the latest TSE CVS to build using Visual C++ 2005 Express Edition. I basically followed the steps Matt, Brian, and Phil outlined in a seprate resource, but had to make some slight changes to get it to work.

0) (No Change) All install directories default.

1) (Change) Installed the Visual C++ 2005 Express Edition

2) (Change) Download and install the Platform Core SDK, PSDK-x86.exe for 32-bit processors. (If you have 64-bit Windows feel free to try the other SDK appropriate for your processor.) Create a folder PlatformSDK under C:\Program Files\Microsoft Visual Studio 8\VC. Copy the bin, include, and lib folders from C:\Program Files\Microsoft Platform SDK to the new folder.

http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en

3) (Change) Using your favorite text editor, change the following file:

C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults\corewin_express.vsprops

Add the following entries to the AdditionalDependencies section:

user32.lib
gdi32.lib
winspool.lib
comdlg32.lib
advapi32.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
odbc32.lib
odbccp32.lib

4) (Change) Now we need to point Visual Studio at the files in the DirectX SDK so that it can use them for compilation:

Goto Tools->Options. Expand "Projects and Solutions" on the left and click on "VC++ Directories"

Choose "Include files" from the "Show directories for:" drop down in the top right. Add these two entries (click on the folder looking button):

C:\Program Files\Microsoft DirectX 9.0 SDK (August 2005)\include

Choose "Library files" from the "Show directories for:" drop down in the top right. Add this entry (click on the folder looking button):

C:\Program Files\Microsoft DirectX 9.0 SDK (August 2005)\Lib\x86

5) (Path change) Open up Visual C++ 2005 Express Edition. Choose File->Open->Project/Solution and browse to \vc7\TSE SDK.sln

6) (No change) At this point it will open up the Visual Studio Conversion Wizard. Hit Next, choose Yes, create a backup before converting (if you like), Next, and Finish. It will convert the projects.

7) (Change) Now right-click on Torque Shader Engine in the Solution Explorer and choose "Properties" (at the bottom). Under "Configuration Properties" on the left click on "Debugging". On the right put in ../example in the "Working Directory" property. Next, choose "Release" from the "Configuration" drop down at the top left. Put in ../example in the "Working Directory" property here also.

Now to compile:

8) In the menu goto Build->Build Solution or right-click on the top toolbar and select "Build" from the menus listed there.

9) Assuming we have it all configured correctly you will get:

Torque Shader Engine - 0 error(s), 1 warning(s)
========== Build: 5 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

The only warning I get is:

..\engine\gfx\D3D\gfxD3DDevice.cpp(31) : warning C4482: nonstandard extension used: enum 'GFXVertexColor::ColorOrdering' used in qualified name
#10
11/28/2005 (3:14 pm)
Quote:You can get the SDK here. I went and downloaded the PSDK-x86.exe file half way down that page, and went through the install (which then downloads the SDK). It was nearly a GB, so if your connection is not so hot, now would be a good time to make a coffee.


Well this would be helpful if i wasn't stuck on dial up :( IF its close to a GB for the SDK then i would need to leave the pc on for about a month to get it and thats if it doesn't crash on me :( Any download links where i may be able to get it and then resume if i get disconnected ?

being that 1024 MB = 1 gb and it takes me almost 8 hours to get about 50 mg :(
#11
11/29/2005 (11:43 am)
Sorry Jeffery I was slow to reply. Yes it says its for Windows Server 2003, but as Eric said, if you grab the x86 version that will cover WinXP as well.
#12
11/29/2005 (3:24 pm)
I still like my VC6...
#13
11/29/2005 (6:26 pm)
Whoo! I totally missed this thread before. Had gotten my build issues on VS05 debugged but couldn't get some files to link.

Will give it a shot this weekend.

*crosses fingers*

*knocks on wood*

*prays*

*wonders if holy water, the tossing of salt, or wearing rings of garlic will be required...*
#14
11/29/2005 (6:33 pm)
One additional warning to the uninitiated: you have to add those include and lib directories to more than one project -- I didn't add them to everything, but the glu2d3d and opengl2d3d projects need them. Also, I had to go down to the torqueDemo.rc (expand torqueDemo project all the way down till you see torqueDemo.rc at the bottom) and add the include there as well.

Thanks a LOT to Ray and Matt Fairfax for the helpful resources on this! Visual Studio to the masses! :-)
#15
12/01/2005 (4:29 pm)
Hey, I forgot to post it on this thread, but yesterday I made a stripped-down version of the platform SDK for anyone who doesn't want to give up a gig or wait all day for the full thing. This is NOT RECOMMENDED for anyone who wants to use Visual Studio to make a wide range of Windows software. However, for people who just want to compile Torque, this will work, and it comes out to 40 megs unzipped, 6.3 megs download size.

Download absolute minimum core SDK here.
#16
12/03/2005 (10:01 pm)
opengl2d3d fails to build with
LINK : fatal error LNK1181: cannot open input file 'ljpeg.lib'

And glu2d3d fails to build with
LINK : fatal error LNK1181: cannot open input file 'ogg_static.lib'

I dun' have no clue what that means I'm supposed to do.
#17
12/04/2005 (12:38 am)
Im having problems also, I did everything, it all compiles except Torque Demo, heres my error message while its compiling, I get alot of other warnings, but no fatal errors...whats causing this? It went from 7 errors to 1 error, and Im sooo close :(

c1xx : fatal error C1083: Cannot open source file: 'Demo.pch /Fo.\../engine/out.VC6.RELEASE/ /Fd.\../engine/out.VC6.RELEASE/ /c /TP ..\engine\i18n\lang.cc': No such file or directory

EDIT: Ok, reinstalled Torque, and redid all the steps and now it works..Weeee :D
#18
12/04/2005 (6:42 pm)
just so i understand this correctly, this means we CAN use Visual C++.net that is included with Visual Studio 2005 to compile, update, and add to TGE? And we can build any additional functionality we want the TorqueScript to use inside this as well?

thanks
#19
12/05/2005 (4:46 am)
excellent resource, got it working under VC++ 2005 Exp. Ed. without any problems!
Great!
#20
12/06/2005 (7:50 pm)
@Jonathon: in case you haven't figured it out yet, yes, that's exactly what this means! :-)

Anybody still having trouble getting this going?
Page «Previous 1 2 3 4 Last »