Game Development Community

Visual Studio 2005 compiling; My experince.

by Dalore · in Torque Game Engine Advanced · 01/20/2006 (11:03 am) · 4 replies

Hello all,

I am a new TGE / TSE owner and I found myself overwhelmed shortly after down loading and trying to compile the products. One of the reasons I was in this state was the amount of information one can find on the forums. The community here is robust but you may end up information mining to get that one piece to help you. I write this to maybe help some new folks that face some of the problems I found.

Who may find this helpful?
Those using Microsoft Visual Studio 2005 Express Edition (V.S. here after) to compile TGE or TSE.

The issues I had are as follows:

I set up V.S., Platform SDK and DirectX SDK as in this forum.

VS setup & configure

After completing this I worked on compiling TGE.

I came across several issues.

First fatal errors: Missing windows.h, objbase.h, and ole2.h errors

Some research revealed the compiler was looking for these in Platform SDK (windows.h) and DirectX SDK (objbase.h, ole2.h). I couldn't find them in those areas at all. After a forum post and replies from some helpful folks (Florian Ross , Vernon Finch) I was led to this post.

Microsoft VS & SDK configure

The note at step three was the most effective fix for me. After copying these directories all my missing h files errors where solved. Ensure you follow these instructions. And do the final note create a windows application. If this works you are getting pretty close.

The next fatal error I came across was:

C2146: syntax error: missing ';' before identifier 'PVOID64'
C4430: missing type specifier - int assumed. Note: C++ does not support default-int

You can fix these by following the answer here.

MSDN answers

Use MSDN search for any errors you may get until you get down to linking errors for library files in the TGE project.

My final error to contend with was a LNK error: can not link to ljpeg.lib. I read forums and double-checked paths until I was ready to scream. Then I came across one post that said you should compile the offending library first and then do a build on the engine. That did the trick. I don't understand why, the library was already built but it worked.

I hope this helps relieve some folk's frustration. If you have other errors post here and I will do what I can to help.

David.

#1
01/20/2006 (11:43 am)
Hi David,

Yes, there is a little learning curve on getting VC++ Express to work. The thing about the libjpeg.lib, it's probably supplied (by GG) in .obj format ready for linking. If the code wasn't built with the VC++ Express compiler, your going to get errors with the linker.

There is an article on tdn.garagegames.com that talks about all this though. I'm not sure if that's what you used as a guide.

Of course I've only built the TLK 1.4 code recently with this compiler and haven't tried the stock TGE 1.4 code or TSE yet.

Steve
#2
01/20/2006 (1:41 pm)
The easiest fix for the PVOID64 problem is this:

Delete basetsd.h from Torque's lib/directx directory. That fixes it with no side effects and no hacking of PSDK headers.

T.
#3
01/20/2006 (5:29 pm)
I wanted to give a personal thank you for taking the time to write up your experiences! Many people are quite new to compiling projects of any size, and I'm sure this will be helpful to many.
#4
01/21/2006 (1:20 pm)
@Stephen
No Problem, I hope it helps save some folks time.

I'm an old Visual Stuido 97 user and was use to my IDE being capable of doing win32 projects out of the box.

I was not expecting that VS express would require so much to do the same, but you get what you pay for ;-)

Thanks