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
#21
12/07/2005 (7:15 am)
wow, that's great! i'm wondering what people think about doing this? from what i've read, everyone seems to think .net has a ton of overhead that would come with using it, or were they more talking about using C#.net? i've seen comparisons of Ogre (top open source C++ engine) to Axiom (the C# conversion of Ogre) and Axiom either matches or comes out ahead in almost every area. thoughts?
#22
12/14/2005 (6:12 pm)
RE: Building Torque 1.4 with Visual C++ 2005 Express Edition

I ran into a couple of LINK errors:

------ Build started: Project: Torque Demo, Configuration: Release Win32 ------
Linking...
theoraPlayer.obj : error LNK2001: unresolved external symbol _vorbis_info_init
theoraPlayer.obj : error LNK2001: unresolved external symbol _ogg_sync_pageout
winInput.obj : error LNK2001: unresolved external symbol _ImmGetContext@4
winInput.obj : error LNK2001: unresolved external symbol _ImmReleaseContext@8
winNet.obj : error LNK2001: unresolved external symbol _accept@12
winNet.obj : error LNK2001: unresolved external symbol _listen@8
winRedbook.obj : error LNK2001: unresolved external symbol __imp__auxGetVolume@8
winRedbook.obj : error LNK2001: unresolved external symbol
winWindow.obj : error LNK2001: unresolved external symbol _ImmAssociateContext@8
vorbisStream.obj : error LNK2001: unresolved external symbol _vorbis_packet_blocksize
vorbisStream.obj : error LNK2001: unresolved external symbol _ogg_page_continued
../example/torqueDemo.exe : fatal error LNK1120: 82 unresolved externals
Build log was saved at "file://c:\Torque\SDK\engine\out.VC6.RELEASE\BuildLog.htm"
Torque Demo - 83 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 6 up-to-date, 0 skipped ==========

So...in addition to the libraries Nathan and Vernon mentioned I added:

theora_static.lib
theora_static_d.lib
ogg_static.lib
ogg_static_d.lib
vorbis_static.lib
vorbis_static_d.lib
vorbis_static_mt.lib
WinMM.lib
WSock32.lib
Imm32.lib
Vfw32.lib

3) (Change) Add the following entries to the AdditionalDependencies section (my complete list):

user32.lib
gdi32.lib
winspool.lib
comdlg32.lib
advapi32.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
odbc32.lib
odbccp32.lib
theora_static.lib
theora_static_d.lib
ogg_static.lib
ogg_static_d.lib
vorbis_static.lib
vorbis_static_d.lib
vorbis_static_mt.lib
WinMM.lib
WSock32.lib
Imm32.lib
Vfw32.lib

@Paul - adding the additional libraries (and making sure you've got the inculde paths right) should address your "ogg_static" problems...

@all - can someone confirm that all these libraries are needed and I'll update the wiki entry?

thanks for all your help guys!
#23
12/27/2005 (9:21 am)
Nathans list of libraries is a better list than mine for thoroughness. When I originally did it, I just took each error one by one, found the lib that got rid of the error and continued until I had none.

Microsoft has released a video on getting the PlatformSDK installed and working with VC 2005 express, and they include most of Nathans list (only omitting the odbc libs) for building win32 applications.

I haven't had to add in any of the extra libs you have added Jake, but I also haven't probed into those sections either.
#24
12/28/2005 (3:16 pm)
I am having compile difficulties with Torque.

I cannot add any new resources to my SDK ie: fxGrassReplicator, advCamera etc.

I have tried installing them, following the instructions carefully and I still see no changes after I compile and run the DEBUG. With the grass replicator, I cannot create an object from the F4 menu, I click on the fxGrassreplicator and give it a name, but then it disappears. With the advCamera, I dont get anything.

I have followed this resource and I still get a final compile report, 11 sucess, 1 fail. However, this is a big improvement over my last builds!

Is there something that I am doing wrong? Is there a specific/essential step to the installations that is common sense to the professional programmer and I am missing? I can include a BuildLog if anyone could please have a look into my situation, I need to get a project together for my cadetship...
#25
12/29/2005 (8:15 am)
You obviously can't run it if it's failing on a project. You need to handle all the build errors before running it and expecting it to work properly. You should start by telling us what version of compiler you are using, what version of TGE/TSE you are using and what the build errors are that you are getting.
#26
12/29/2005 (8:46 am)
I'm getting the following errors when building TGE 1.4 in VS.net 2005 Pro:

Error 20 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int d:\torque\sdk\lib\maxsdk31\shape.h 326


I get about 80 of that same error for different locations! Ack! Anyone know what's up?
#27
12/31/2005 (10:43 pm)
Jake T's list of libraries should be added to the Visual Studio 2005 Express tutorial.
#28
01/02/2006 (11:48 am)
i keep getting this error?

Y:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winnt.h(222) : error C2059: syntax error : ';'
#29
01/03/2006 (7:15 am)
I have tried to build TGE 1.4 with VS 2005 Professional,

My build report produces these errors.

9>LINK : fatal error LNK1104: cannot open file 'engine_DEBUG.lib'
(in map2dif plus)

11>../tools/buildWad_DEBUG.exe : fatal error LNK1120: 3 unresolved externals
(in 'buildWad)

These errors are consistant with my builds, I get the same thing every time I compile my project.

Any ideas?

Regards,
Louden
#30
01/09/2006 (11:40 pm)
I still get the same errors when I compile.

9>LINK : fatal error LNK1104: cannot open file 'engine_DEBUG.lib'
(in map2dif plus)

11>../tools/buildWad_DEBUG.exe : fatal error LNK1120: 3 unresolved externals
(in 'buildWad)

In audition to my troubles, now every time I run TGE 1.4, my computer restarts. Even after a reinstall!!!

Please help.

Regards,
Louden
#31
01/19/2006 (9:21 am)
@ Louden

I'm getting a similar error. 1181 LNK ljpeg.lib.

I haven't resolved it yet but it's got something to do with either the build order or a missing path. The ljpeg.lib is building to the output directory but for what ever reason the engine build can't link to it. My thought
1) is the library building after the engine? A build order problem. But if this were true wouldn't the next rebuild fix the problem ie.. The library is already built.

2. the tourque demo is not linking to the libraries build directory correctly. This is most likely but I have not found the exact area to link it yet. Everything I've checked shows it pointing to the correct directories.

Mind you all of my other libraries haven't complained about linking yet so I'm not quite sure whats going on.

This is the only fatal error I have left. So hopefully I find an answer soon.
#32
01/19/2006 (8:02 pm)
Just a follow up.

I guess my first thought was correct.

I built the ljpeg.lib first and then built the engine. 7 succeeded and 0 Failed.
#33
01/28/2006 (4:58 am)
i made all that with Microsoft Visual Studio 2005 but i stil have errors what can i do ??
#34
02/07/2006 (10:17 am)
I think I have doent his about a million times. Everytime I have done this I get the windows.h and objbase.h errors and they are te only two.what am I doing wrong? I can't figure it out. If someone could help That would be cool but in the mean time I will be doign and redoing these processes until I get ti right


c:\forgotten\lib\directx8\d3d.h(23) : fatal error C1083: Cannot open include file: 'objbase.h': No such file or directory

This is one of the errors
#35
02/07/2006 (10:30 am)
------ Build started: Project: opengl2d3d, Configuration: Debug Win32 ------
Compiling...
vc7fix.cpp
opengl2d3d.cc
c:\forgotten\lib\directx8\d3d.h(23) : fatal error C1083: Cannot open include file: 'objbase.h': No such file or directory
Generating Code...
Build log was saved at "file://c:\Forgotten\lib\out.VC6.DEBUG\opengl2d3d\BuildLog.htm"
opengl2d3d - 1 error(s), 0 warning(s)

c:\forgotten\engine\platformwin32\platformwin32.h(21) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
winV2Video.cc
c:\forgotten\engine\platformwin32\platformwin32.h(21) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
Generating Code...
Compiling...
winTime.cc
c:\forgotten\engine\platformwin32\platformwin32.h(21) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
winThread.cc
c:\forgotten\engine\platformwin32\platformwin32.h(21) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
winStrings.cc
c:\forgotten\engine\platformwin32\platformwin32.h(21) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
winSemaphore.cc
c:\forgotten\engine\platformwin32\platformwin32.h(21) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
winRedbook.cc
c:\forgotten\engine\platformwin32\platformwin32.h(21) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
winProcessControl.cc
c:\forgotten\engine\platformwin32\platformwin32.h(21) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
winOpenAL.cc
c:\forgotten\engine\platformwin32\platformwin32.h(21) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
winOGLVideo.cc
c:\forgotten\engine\platformwin32\platformwin32.h(21) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
winNet.cc
c:\forgotten\engine\platformwin32\platformwin32.h(21) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
winMutex.cc
c:\forgotten\engine\platformwin32\platformwin32.h(21) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
winMemory.cc
c:\forgotten\engine\platformwin32\platformwin32.h(21) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
winMath_ASM.cc
winMath.cc
winInput.cc
c:\forgotten\engine\platformwin32\platformwin32.h(21) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
winGLSpecial.cc
c:\forgotten\engine\platformwin32\platformwin32.h(21) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
winGL.cc
c:\forgotten\engine\platformwin32\platformwin32.h(21) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
winFont.cc
c:\forgotten\engine\platformwin32\platformwin32.h(21) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
winFileio.cc
c:\forgotten\engine\platformwin32\platformwin32.h(21) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
winDirectInput.cc
c:\forgotten\engine\platformwin32\platformwin32.h(21) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
winDInputDevice.cc
c:\forgotten\engine\platformwin32\platformwin32.h(21) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
Generating Code...
Compiling...
winD3DVideo.cc
c:\forgotten\engine\platformwin32\platformwin32.h(21) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
winCPUInfo.cc
c:\forgotten\engine\platformwin32\platformwin32.h(21) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
winConsole.cc
c:\forgotten\engine\platformwin32\platformwin32.h(21) : fatal error C1083: Cannot open include file: 'windows.h': No such file



can anyone make sense of this. I'm getting pretty irritated since I have followed every step in the multiple tutorials and read other peoples notes.
#36
02/07/2006 (10:41 am)
ok I'm putting it down for a few hours, I always have problems with this kinda of stuff
#37
02/13/2006 (2:39 pm)
Hey all, I am getting these errors with TSE
DXDiagNVUtil.obj : error LNK2019: unresolved external symbol __imp__CoUninitialize@0 referenced in function "public: long __thiscall NVDXDiagWrapper::DXDiagNVUtil::FreeIDxDiagContainer(void)" (?FreeIDxDiagContainer@DXDiagNVUtil@NVDXDiagWrapper@@QAEJXZ)
DXDiagNVUtil.obj : error LNK2019: unresolved external symbol __imp__CoCreateInstance@20 referenced in function "public: long __thiscall NVDXDiagWrapper::DXDiagNVUtil::InitIDxDiagContainer(void)" (?InitIDxDiagContainer@DXDiagNVUtil@NVDXDiagWrapper@@QAEJXZ)
DXDiagNVUtil.obj : error LNK2019: unresolved external symbol __imp__CoInitialize@4 referenced in function "public: long __thiscall NVDXDiagWrapper::DXDiagNVUtil::InitIDxDiagContainer(void)" (?InitIDxDiagContainer@DXDiagNVUtil@NVDXDiagWrapper@@QAEJXZ)
DXDiagNVUtil.obj : error LNK2019: unresolved external symbol __imp__VariantClear@4 referenced in function "public: long __thiscall NVDXDiagWrapper::DXDiagNVUtil::GetProperty(struct NVDXDiagWrapper::IDxDiagContainer *,wchar_t const *,class std::basic_string,class std::allocator > *)" (?GetProperty@DXDiagNVUtil@NVDXDiagWrapper@@QAEJPAUIDxDiagContainer@2@PB_WPAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z)
DXDiagNVUtil.obj : error LNK2019: unresolved external symbol __imp__VariantInit@4 referenced in function "public: long __thiscall NVDXDiagWrapper::DXDiagNVUtil::GetProperty(struct NVDXDiagWrapper::IDxDiagContainer *,wchar_t const *,class std::basic_string,class std::allocator > *)" (?GetProperty@DXDiagNVUtil@NVDXDiagWrapper@@QAEJPAUIDxDiagContainer@2@PB_WPAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z)
../example/TSE.exe : fatal error LNK1120: 5 unresolved externals

Thanks
#38
02/16/2006 (5:25 pm)
Now I am down to these errors.
Linking...
LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs; use /NODEFAULTLIB:library
DXDiagNVUtil.obj : error LNK2019: unresolved external symbol __imp__VariantClear@4 referenced in function "public: long __thiscall NVDXDiagWrapper::DXDiagNVUtil::GetProperty(struct NVDXDiagWrapper::IDxDiagContainer *,wchar_t const *,class std::basic_string,class std::allocator > *)" (?GetProperty@DXDiagNVUtil@NVDXDiagWrapper@@QAEJPAUIDxDiagContainer@2@PB_WPAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z)
DXDiagNVUtil.obj : error LNK2019: unresolved external symbol __imp__VariantInit@4 referenced in function "public: long __thiscall NVDXDiagWrapper::DXDiagNVUtil::GetProperty(struct NVDXDiagWrapper::IDxDiagContainer *,wchar_t const *,class std::basic_string,class std::allocator > *)" (?GetProperty@DXDiagNVUtil@NVDXDiagWrapper@@QAEJPAUIDxDiagContainer@2@PB_WPAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z)
DXDiagNVUtil.obj : error LNK2019: unresolved external symbol __imp__CoCreateInstance@20 referenced in function "public: long __thiscall NVDXDiagWrapper::DXDiagNVUtil::InitIDxDiagContainer(void)" (?InitIDxDiagContainer@DXDiagNVUtil@NVDXDiagWrapper@@QAEJXZ)
DXDiagNVUtil.obj : error LNK2019: unresolved external symbol __imp__CoInitialize@4 referenced in function "public: long __thiscall NVDXDiagWrapper::DXDiagNVUtil::InitIDxDiagContainer(void)" (?InitIDxDiagContainer@DXDiagNVUtil@NVDXDiagWrapper@@QAEJXZ)
DXDiagNVUtil.obj : error LNK2019: unresolved external symbol __imp__CoUninitialize@0 referenced in function "public: long __thiscall NVDXDiagWrapper::DXDiagNVUtil::FreeIDxDiagContainer(void)" (?FreeIDxDiagContainer@DXDiagNVUtil@NVDXDiagWrapper@@QAEJXZ)
../example/TSE_DEBUG.exe : fatal error LNK1120: 5 unresolved externals
Build log was saved at "file://c:\tse\tse\engine\out.vc7.win32.debug\BuildLog.htm"
Torque Shader Engine - 6 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 4 skipped ==========
Help :)
Thanks
#39
02/25/2006 (2:07 am)
Jim Wuerch helped me to resolve the warning C4482: nonstandard extension used: enum 'GFXVertexColor::ColorOrdering' used in qualified name issue. Here is his fix:
Quote:This warning is telling you that you dont need to specify the enum name, so changing the line to say:
GFXVertexColor::sVertexColorOrdering = GFXVertexColor::ColorOrdering::BGRA;
I have implemented and tested this to work with TSE on Visual C++ 2005 Express. Simply change Line 31 in /engine/gfx/D3D/gfxD3DDevice.cpp to reflect the code above and re-compile.
#40
03/11/2006 (9:08 pm)
If you are getting errors and used $(Program Files) try replacing that with the actual path, for example c:\Program Files

In my case the variable was not expanding and this lead to errors about missing headers and libraries.

Also make sure you add the paths under the correct section. The MS video added the Bin, Lib,and Include path all under the same section they should go in the correct section in the options dialog.