Game Development Community

Error Compiling TGB with VS 2005 Express Edition (not beta)

by Andy Hawkins · in Torque Game Builder · 08/09/2006 (5:06 pm) · 18 replies

Firstly, I've checked the forums and the current solutions with relation to Express and cmd.exe either do not offer a solution or do not fix my issue.

I'm using WinXP, Visual Studio Express 2005, Platform SDK, and it wont run cmd.exe. I get these errors - I check the forums before they went down and there doesn't appear to be a solution...basically I follow the TDN instructions to set up Visual Studio Express with T2D to the letter and when I try to compile it I get these errors... to do with cmd.exe... I added the path C:\windows\System32 to the VC Directories and it did't make a difference.

There also appears to be an error with BSMAKE - I believe they are all from the same issue??? Maybe?

I hope you can help. I am bit confused as to why a vanilla install of TGB, no tampering, a default install of VS Express and Platform SDK, then using the TDN docs wont work... surely it must have been tested???

------ Build started: Project: opengl2d3d, Configuration: Debug Win32 ------

Performing Pre-Build Event...

Project : error PRJ0003 : Error spawning 'cmd.exe'.

Build log was saved at "file://c:\Program Files\TorqueGameBuilderPro\engine\Link\Debug\opengl2d3d\BuildLog.htm"

opengl2d3d - 1 error(s), 0 warning(s)

------ Build started: Project: glu2d3d, Configuration: Debug Win32 ------

Performing Pre-Build Event...

Project : error PRJ0003 : Error spawning 'cmd.exe'.

Build log was saved at "file://c:\Program Files\TorqueGameBuilderPro\engine\Link\Debug\opengl2d3d\BuildLog.htm"

glu2d3d - 1 error(s), 0 warning(s)

------ Build started: Project: T2D, Configuration: Debug Win32 ------

Performing Pre-Build Event...

Project : error PRJ0003 : Error spawning 'cmd.exe'.

Creating browse information file...

Microsoft Browse Information Maintenance Utility Version 8.00.50727

Copyright (C) Microsoft Corporation. All rights reserved.

BSCMAKE: error BK1506 : cannot open file '..\..\Link\Debug\astAlloc.sbr': No such file or directory

Build log was saved at "file://c:\Program Files\TorqueGameBuilderPro\engine\Link\Debug\BuildLog.htm"

T2D - 2 error(s), 0 warning(s)

#1
08/09/2006 (5:34 pm)
Have you downloaded the DirectX SDK? I got the June 2006 release, followed the tutorial and it works fine.
#2
08/09/2006 (8:49 pm)
I think I have the April release - I'll grab the update - thank you :)
#3
08/10/2006 (3:05 am)
Do I need to add links to the DirectX libs/include folder under VC Directories as well?
#4
08/10/2006 (7:21 am)
I don't think so. Just took a look at my settings, and I don't have anything related to the DX directory. Don't forget, the default installation directory for the platform SDK is not the one pictured in the example in the TDN. My default installation directory was: "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\"
If you didn't change the installation directory to the one in the TDN, but typed it in, that could also be the problem.
#5
08/10/2006 (3:45 pm)
Yes... I noticed that the PDK and DX are not as they are listed on TDN. I have grabbed the latest of everything. So far, so good - I still have more to install - I suspect the problems are coming from the fact that I had all this stuff installed before, nuked windows and installed over the top of the folders. This time I removed everything and started from scratch.
#6
08/10/2006 (4:24 pm)
Okay I did everything they said and still I have the same error "error spawning cmd.exe" this is VERY annoying to say the least.

I've invested all this time and money, and followed the instructions to the letter and it still don't work.

Where is the TGB staff please? A default install of everything, and it doesn't compile. Can someone assist please?
#7
08/10/2006 (4:33 pm)
Here's the build log output... looks like something to do with DirectX

@echo off

if exist ..\..\Lib\directx8\basetsd.h del ..\..\Lib\directx8\basetsd.h

if errorlevel 1 goto VCReportError

goto VCEnd

:VCReportError

echo Project : error PRJ0019: A tool returned an error code from "Performing Pre-Build Event..."

exit 1

:VCEnd
]
Creating command line """c:\Program Files\TorqueGameBuilderPro\engine\Link\Debug\opengl2d3d\BAT00000E34883764.bat"""
 Output Window      Performing Pre-Build Event...
Project : error PRJ0003 : Error spawning 'cmd.exe'.
#8
08/10/2006 (4:36 pm)
It looks like it's looking for DirectX 8 files - but there aren't any in the June 2006 version of it - have I done something wrong?

PS - I happen to have DirectX8 files installed in a separate folder, so I added the libs and include folders for these files to the VC Directories - still nothing... looking at the linker options now.
#9
08/10/2006 (5:09 pm)
This is quite strange. I'm running DirectX 9c on this computer. In the tutorial on the TDN it changes the Environment Variable. I didn't actually do this on my computer manually, but when I checked the environment variable, I found this "C:\Program Files\Microsoft DirectX SDK (June 2006)\Utilities\Bin\x86"; That's the only line in there that had anything to do with DX so make sure you have something like that. Also, when your loading your project solution, are you loading the right project file?
#10
08/10/2006 (6:15 pm)
Where can you see this environment variable? In My Computer->Properties->Advanced->Environment ... somewhere in there? Which setting? Or is this in VC itself?
#11
08/10/2006 (6:33 pm)
Go to the environment variables area (doing what you mentioned above). Then, in the lower box, scroll down till you see something called "Path". Double click it and press the left/right arrow to move around and see if you have any direct X paths there. Instead of pressing left and right, you could select everything, copy it and then paste it in to notepad. Each path ends in a semi-colon.
#12
08/10/2006 (6:49 pm)
Yep it's in there alright... i'm stumped... and very p***ed off!
#13
08/10/2006 (6:52 pm)
There's more...

T2D : warning PRJ0041 : Cannot find missing dependency 'winwlm.h' for file 'T2D SDK.rc'.  Your project may still build, but may continue to appear out of date until this file is found.


T2D : warning PRJ0041 : Cannot find missing dependency 'macwin32.h' for file 'T2D SDK.rc'.  Your project may still build, but may continue to appear out of date until this file is found.


T2D : warning PRJ0041 : Cannot find missing dependency 'macwin32.h' for file 'T2D SDK.rc'.  Your project may still build, but may continue to appear out of date until this file is found.


T2D : warning PRJ0041 : Cannot find missing dependency 'macwin32.h' for file 'T2D SDK.rc'.  Your project may still build, but may continue to appear out of date until this file is found.


T2D : warning PRJ0041 : Cannot find missing dependency 'macwin32.h' for file 'T2D SDK.rc'.  Your project may still build, but may continue to appear out of date until this file is found.


T2D : warning PRJ0041 : Cannot find missing dependency 'macwin32.h' for file 'T2D SDK.rc'.  Your project may still build, but may continue to appear out of date until this file is found.


T2D : warning PRJ0041 : Cannot find missing dependency 'macwin32.h' for file 'T2D SDK.rc'.  Your project may still build, but may continue to appear out of date until this file is found.


T2D : warning PRJ0041 : Cannot find missing dependency 'rpcerr.h' for file 'T2D SDK.rc'.  Your project may still build, but may continue to appear out of date until this file is found.


T2D : warning PRJ0041 : Cannot find missing dependency 'rpcmac.h' for file 'T2D SDK.rc'.  Your project may still build, but may continue to appear out of date until this file is found.


T2D : warning PRJ0041 : Cannot find missing dependency 'macname1.h' for file 'T2D SDK.rc'.  Your project may still build, but may continue to appear out of date until this file is found.


T2D : warning PRJ0041 : Cannot find missing dependency 'macpub.h' for file 'T2D SDK.rc'.  Your project may still build, but may continue to appear out of date until this file is found.


T2D : warning PRJ0041 : Cannot find missing dependency 'macapi.h' for file 'T2D SDK.rc'.  Your project may still build, but may continue to appear out of date until this file is found.


T2D : warning PRJ0041 : Cannot find missing dependency 'macname2.h' for file 'T2D SDK.rc'.  Your project may still build, but may continue to appear out of date until this file is found.

Creating temporary file "c:\Program Files\TorqueGameBuilderPro\engine\Link\Debug\BAT00000337202872.bat" with contents
[
@echo off

if exist ..\..\Lib\directx8\basetsd.h del ..\..\Lib\directx8\basetsd.h

if errorlevel 1 goto VCReportError

goto VCEnd

:VCReportError

echo Project : error PRJ0019: A tool returned an error code from "Performing Pre-Build Event..."

exit 1

:VCEnd
]
Creating command line """c:\Program Files\TorqueGameBuilderPro\engine\Link\Debug\BAT00000337202872.bat"""
Creating temporary file "c:\Program Files\TorqueGameBuilderPro\engine\Link\Debug\RSP00000437202872.rsp" with contents
[
/o ".\../../Link/Debug/T2D.bsc"

"..\..\Link\Debug\astAlloc.sbr"
#14
08/10/2006 (7:36 pm)
Ohhh - got a solution... I'm going back to the start and repeat it to make sure but it involves changing a line in winnt.h from #include to #include "basetsd.h", and added lib folders for DX and PDK. I will do some tests and post a solution soon.
#15
09/07/2006 (9:00 am)
Is there a step by step tutorial for compiling TGB using Visual C++ Espress 2005?

Im struggling a little to get to grips with this :)
#16
09/07/2006 (7:02 pm)
Try this link - make sure you have Express and Platform SDK first.

tdn.garagegames.com/wiki/T2D/TGBTutorials/BuildingADebugVersion
#17
09/08/2006 (1:28 am)
Thanks Andy this is exactly what I needed!
#18
09/08/2006 (8:25 am)
No problem. Watch out for those errors above too...
Quote:
it involves changing a line in winnt.h from #include to #include "basetsd.h", and added lib folders for DX and PDK