Building/Compiling TGB Without MVS
by Kevin James · in Torque Game Builder · 05/19/2008 (6:59 pm) · 14 replies
So if I don't want to use Microsoft Visual Studio, what are my other options for compiling TGB source? Preferably freeware options, but I'd like to see as many as you can give me! Is Dev C++ an option?
Thanks,
Kevin
Thanks,
Kevin
About the author
Computer security, digital forensics, and platform jumper enthusiast. shells.myw3b.net/~syreal/
#2
05/19/2008 (8:15 pm)
I've been using code::blocks to compile TGB for a long time now. It's free and you can easily import MSVC projects. I still use Dev C++ for editing my scripts, though I'd probably be better off with Torsion. I just can't let it go lol.
#3
Thanks guys, I appreciate the suggestions.
05/20/2008 (4:59 am)
Thanks for the great suggestions, guys! I'll be trying Codeblocks; I googled "MS Visual Studio to Posix project file converter" but couldn't find anything.Thanks guys, I appreciate the suggestions.
#4
I am incredibly inept at this: I've tried compiling both TGB and Box2D (separately) and I get the same error: unable to find 'windows.h' Know what I'm doing wrong?
Thanks,
Kevin
05/21/2008 (2:26 pm)
Joe,I am incredibly inept at this: I've tried compiling both TGB and Box2D (separately) and I get the same error: unable to find 'windows.h' Know what I'm doing wrong?
Thanks,
Kevin
#5
05/21/2008 (2:28 pm)
You will need to install the Windows Platform SDK for Server 2003 R2.
#6
Another thing to note is the official/"stable" version you get from their main site may be outdated. If want the latest version it's a bit hard to find as for some reason they use their forums to post links to it. They fixed a lot of bugs since then, and it's a bit faster now.
05/21/2008 (3:54 pm)
You'll definitely need to install that. Also be sure you have your Settings->Compiler and Debugger paths set to match your compiler folders. I'm pretty sure Code::Blocks does this automatically when you install, but if you still have trouble after installing the Platform SDK that would be the first thing to check. Another thing to note is the official/"stable" version you get from their main site may be outdated. If want the latest version it's a bit hard to find as for some reason they use their forums to post links to it. They fixed a lot of bugs since then, and it's a bit faster now.
#7
Unfortunately, I'm still having many, many problems. I installed the Platform SDK, but the same error persists:
Also, very strangely, while attempting to build the Box2d engine, I can get anywhere from 75 to 7000 warnings. Here are some examples:
I've gotten some other warnings, like the "expecting a side-effect" one and some signed versus unsigned mumbo jumbo.
I'd appreciate any direction.
Thanks for putting up with me!
EDIT: I forgot: the paths seem to be correct, Joe.
05/22/2008 (3:43 pm)
Thanks for the speedy response, guys.Unfortunately, I'm still having many, many problems. I installed the Platform SDK, but the same error persists:
||=== TorqueGameBuilder, Debug Win32 ===| T2D SDK.rc|10|fatal error RC1015: cannot open include file 'windows.h'.| ||=== Build finished: 1 errors, 0 warnings ===|
Also, very strangely, while attempting to build the Box2d engine, I can get anywhere from 75 to 7000 warnings. Here are some examples:
C:\Program Files\Box2D_v2.0.1\Source\Collision\b2Distance.cpp||In function 'int32 ProcessThree(b2Vec2*, b2Vec2*, b2Vec2*, b2Vec2*, b2Vec2*)':| C:\Program Files\Box2D_v2.0.1\Source\Collision\b2Distance.cpp|87|warning: statement has no effect|
I've gotten some other warnings, like the "expecting a side-effect" one and some signed versus unsigned mumbo jumbo.
I'd appreciate any direction.
Thanks for putting up with me!
EDIT: I forgot: the paths seem to be correct, Joe.
#8
05/22/2008 (7:27 pm)
I can't say much about compiling Box2D since I'm not familiar with that.. but it looks like you have your windows.h in a different directory than Code::Blocks is looking. I was able to reproduce this error exactly by moving my windows.h out of the directory it was in. In my case it's "C:\Program Files\Microsoft Visual C++ Toolkit 2003\include".
#9
First, I'm not familiar with Code::Blocks and it sounds like Joe can offer-up advice on that one.
Anyway, just to let you know that a while ago I was playing with Box2D, Chipmunk and other physics engines just because I'm sad and like that kind of thing. Anyway, I found it much easier (for me) to setup Box2D (or anything similar) as a library. You can see these in your build (ljpeg/lpng etc). This way you only have to include Box2D as a library file / header.
Integrating Box2D into TGB is no small endeavour. It all depends on what you want to do really. If you want a special class of objects that work with Box2D but don't maintain their other functionality such as picking etc then that's much easier to do. If you essentially want to replace the TGB rigid-body collision response then be aware that you're getting into a complex problem. I could waffle on about all the things you'll need to address but I won't unless you specifically ask me and I'm more than happy to do so!
The best initial advice I can give is to address the problem of Box2Ds b2World container working in harmony with TGBs t2dSceneGraph (+t2dSceneContainer). This is one of the major headaches you'll get. Maintaining existing functionality whilsts satisfying Box2Ds requirements. You'll probably need to double-book-keep the broad-phase stuff which has a performance hit.
I guess I'd start out with understanding what your expectations are. Perhaps state them here and I'll offer-up the best advice I can but in all cases without a strong C++ knowledge you'll struggle like hell. Just a friendly warning. :)
EDIT: Not to mention that you should never use Box2Ds internal debug rendering stuff as it's slower than a snail going uphill. It makes Box2D look really slow which of course it isn't.
Melv.
05/23/2008 (1:57 am)
*DISCLAIMER*: This is a personal post, nothing official on behalf of GG!First, I'm not familiar with Code::Blocks and it sounds like Joe can offer-up advice on that one.
Anyway, just to let you know that a while ago I was playing with Box2D, Chipmunk and other physics engines just because I'm sad and like that kind of thing. Anyway, I found it much easier (for me) to setup Box2D (or anything similar) as a library. You can see these in your build (ljpeg/lpng etc). This way you only have to include Box2D as a library file / header.
Integrating Box2D into TGB is no small endeavour. It all depends on what you want to do really. If you want a special class of objects that work with Box2D but don't maintain their other functionality such as picking etc then that's much easier to do. If you essentially want to replace the TGB rigid-body collision response then be aware that you're getting into a complex problem. I could waffle on about all the things you'll need to address but I won't unless you specifically ask me and I'm more than happy to do so!
The best initial advice I can give is to address the problem of Box2Ds b2World container working in harmony with TGBs t2dSceneGraph (+t2dSceneContainer). This is one of the major headaches you'll get. Maintaining existing functionality whilsts satisfying Box2Ds requirements. You'll probably need to double-book-keep the broad-phase stuff which has a performance hit.
I guess I'd start out with understanding what your expectations are. Perhaps state them here and I'll offer-up the best advice I can but in all cases without a strong C++ knowledge you'll struggle like hell. Just a friendly warning. :)
EDIT: Not to mention that you should never use Box2Ds internal debug rendering stuff as it's slower than a snail going uphill. It makes Box2D look really slow which of course it isn't.
Melv.
#10
Joe,
Yeah, it seems that the Microsoft Visual Studio 2005/2008 compiler doesn't know where to look for the platform SDK, but using the gcc cygwin compiler, (the default CodeBlocks compiler) I can get pass that windows.h error, but the compiler stops at some other errors. Thanks a lot for introducing me to Code::Blocks, Joe, its a really neat IDE that works great on my computer. (Visual Studio 2005 won't create any projects on my computer, so Code::Blocks is really great in my opinion!) Thanks for your help too!
Melv,
Thanks for your view on things, man! I have a limited knowledge of C++ at best; basically, my ignorance blinded me towards the complexity of integrating Box2D and Torque Game Builder. The cool thing is that I've actually learned a lot just trying to do something productive with this project, and it has given me a desire to learn C++. I think there are some other people trying to integrate Box2D into Torque Game Builder, and I know all of us would appreciate your expert opinion on the subject. I haven't given up, but integrating these two great pieces of software is going to have to take a backseat for now.
05/23/2008 (9:04 am)
Hey, thanks for the well-thought out responses, Joe and Melv.Joe,
Yeah, it seems that the Microsoft Visual Studio 2005/2008 compiler doesn't know where to look for the platform SDK, but using the gcc cygwin compiler, (the default CodeBlocks compiler) I can get pass that windows.h error, but the compiler stops at some other errors. Thanks a lot for introducing me to Code::Blocks, Joe, its a really neat IDE that works great on my computer. (Visual Studio 2005 won't create any projects on my computer, so Code::Blocks is really great in my opinion!) Thanks for your help too!
Melv,
Thanks for your view on things, man! I have a limited knowledge of C++ at best; basically, my ignorance blinded me towards the complexity of integrating Box2D and Torque Game Builder. The cool thing is that I've actually learned a lot just trying to do something productive with this project, and it has given me a desire to learn C++. I think there are some other people trying to integrate Box2D into Torque Game Builder, and I know all of us would appreciate your expert opinion on the subject. I haven't given up, but integrating these two great pieces of software is going to have to take a backseat for now.
#11
You're welcome. I didn't want to put you off but offer some honest advice. Sometimes a problem like that really is the best way to gain a better understanding but sometimes, if the problem is too complex, it can be demoralising! ;)
Melv.
05/23/2008 (9:36 am)
Kevin,You're welcome. I didn't want to put you off but offer some honest advice. Sometimes a problem like that really is the best way to gain a better understanding but sometimes, if the problem is too complex, it can be demoralising! ;)
Melv.
#12
I used GCC for years before switching to MSVC on Windows. I know GCC/Mingw usually comes with a windows.h in the main "include" folder by default, so you won't get that issue. I don't think I was ever successful in building TGB with GCC.. I think the reason I switched over to MSVC was the headache I got from all the errors.
05/23/2008 (3:30 pm)
I'm not 100% sure but I may have copied my Platform SDK include files right into the previously installed MSVC includes. You should be able to go into your Program Files\Microsoft Visual C++ Toolkit 2003\include folder and see windows.h, or you'll get that error. Of course you need to switch the compiler in the IDE to "Microsoft Visual C++ Toolkit 2003" but I'm sure you've tried that.. I don't really know what else could be wrong besides the header files not being where Code::Blocks expects them. Don't give up on Code::Blocks yet though, it's a great IDE once you get it working. Cross platform too, though I have yet to try it on Mac or Linux.I used GCC for years before switching to MSVC on Windows. I know GCC/Mingw usually comes with a windows.h in the main "include" folder by default, so you won't get that issue. I don't think I was ever successful in building TGB with GCC.. I think the reason I switched over to MSVC was the headache I got from all the errors.
#13
I'll probably be using Code::Blocks as I go through C++ for Dummies!
05/24/2008 (7:01 am)
I don't have Microsoft Visual C++ Toolkit 2003 (do you recommend downloading it?), but I do have Microsoft Visual Studio 2005, and I have been trying to use that compiler in Code::Blocks. I haven't put windows.h in the include folder in there yet though, I'll have to try that. I definitely haven't given up on Code::Blocks though; it got me the farthest besides MVS -- the problem with MVS is that it can't create projects. Perhaps I should have mentioned that I've successfully changed the icon of TGB and recompiled the T2D solution using MVS, which is why I was pretty sure that the MVS compiler would work in Code::Blocks.I'll probably be using Code::Blocks as I go through C++ for Dummies!
#14
05/25/2008 (5:17 pm)
Yep, I'm using Microsoft Visual C++ Toolkit 2003 as my Code::Blocks compiler over here.
Torque 3D Owner Stephen Zepp