Game Development Community

Torque Game Builder C++ Build fails...

by Jonathan R Hopkins · in Technical Issues · 06/08/2009 (8:10 pm) · 22 replies

I followed the meager bit of instruction on configuring the building process for Torque Game Builder Pro - but it refuses to do a correct build. Now I am fairly sure I did everything correctly - here's an overview:

I am running Windows Vista 64-bit and am using TGB Pro 1.7.4

I followed the instructions here:
tdn.garagegames.com/wiki/TGB/Setting_up_Compiler


  1. I already have Torsion correctly configured.
  2. I downloaded and installed Visual Studio C++ 2008.
  3. I downloaded and installed Windows SDK for Windows Server 2008 and .NET Framework 3.5.
  4. I configured the options for Visual Studios C++ 2008.
  5. I configured the enviornment variable PATH to ;C:\Program Files\Microsoft Plaftform SDK\Bin and then realized it didn't exist and found another instruction in the main "setting up compiler" page that instructs: PATH is set to the same folder as the first directory. The above link shows a different directory - so I assume by "first directory it was referring to the one where I set up my extra Torque - so I set the enviornment variable to "C:\Program Files\Garage Games\Torque Custom".
  6. I change the platformWin32 line to 0x0501
  7. I opened up the .net version instead of the other one.
  8. Then I built it. I made no modifications to anything.


Here's part of the error output. I didn't include all of it because there was a lot.
8>c:\program files\garage games\torque custom\engine\source\platformwin32\winconsole.cc(48) : error C2664: 'SetConsoleTitleW' : cannot convert parameter 1 from 'UTF16 [512]' to 'LPCWSTR'

    if ((memenv = getenv("JPEGMEM")) != NULL) {


3>c:\program files\garage games\torque custom\engine\lib\ljpeg\jmemmgr.c(1106) : warning C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

3>        c:\program files (x86)\microsoft visual studio 9.0\vc\include\stdlib.h(447) : see declaration of 'getenv'

3>c:\program files\garage games\torque custom\engine\lib\ljpeg\jmemmgr.c(1109) : warning C4996: 'sscanf': This function or variable may be unsafe. Consider using sscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

3>        c:\program files (x86)\microsoft visual studio 9.0\vc\include\stdio.h(324) : see declaration of 'sscanf'

1>c:\program files\garage games\torque custom\engine\lib\zlib\gzio.c(108) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

1>        c:\program files (x86)\microsoft visual studio 9.0\vc\include\string.h(74) : see declaration of 'strcpy'

1>c:\program files\garage games\torque custom\engine\lib\zlib\gzio.c(156) : warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

8>TGBGame - 59 error(s), 0 warning(s)
========== Rebuild All: 6 succeeded, 1 failed, 1 skipped ==========


Any thoughts on why this may be happening?
Page«First 1 2 Next»
#21
06/17/2009 (10:53 pm)
@Jonathan - Huzzah! Glad you got it goin'. Now, to state what Stanley could have more sincerely:

Welcome! =)

Look forward to seeing you in the forums some more.
#22
06/17/2009 (11:17 pm)
Thanks :)

Well I'm back already with one more (hopefully) quick addendum. The Audio one is working great - but the dynamic image loader... didn't. It doesn't think it has the method loaded in on when I try to call the method.

I don't know a whole lot about C++ so I'm not sure what I have to do to implement it. I know in Torque Script you have to have a pointer to scripts to have them compile with the game and make their functions available(i.e. exec("./script.cs")) - so do I have to have something in C++ point to this DynamicImageLoader.cc code?

As a quick reminder, the way I "implemented" it (or thought I did) was by going into C++ Express 2008 and clicking "Project > Add Existing Item..."

The writer of this script didn't mention any need for modifying the c++ file (nor did he mention anything about implementing it haha)... so... any ideas?

Once again here is the topic where I got the code:

Dynamic Image Loader

Thanks again :)
Page«First 1 2 Next»