Game Development Community

Borland Builder and the TGEA

by Ron Hiler · in Torque Game Engine · 12/24/2008 (4:04 am) · 9 replies

Alright, I hope this is the correct place to put this.

The ONLY thing right now that is making me hesitant to buy the TGEA is compilation.

I use Borland Builder 2007 Professional. I find this to be an excellent C++ compiler, and have no desire at all to install any other compiler on my rig. As far as I'm concerned, there is simply no better compiler on the market, free or otherwise, heh. I will not, under any circumstances, install a MS compiler on this machine. There is simply no reason to, since the one I have (and paid a lot of money for) is superior and, since I've been using it (and it's predicessors) for something like 20 years now, am intimitely familiar with how to use it.

But that brings up an issue. Can I compile the TGEA using this compiler? Has anyone else managed this? Would it take a lot of extensive modification to the code base before I could get a sucessful compile?

I did use the search, but nothing recent (or definitive) came up, so any tips would be appreciated.

#1
12/24/2008 (6:37 am)
I do not know if anyone else is using Builder for compiling Torque. You should be fine building your own projects from the ground up or using conversion tools. But there are no Builder projects included. I doubt you will have to make any codebase modifications to get it going; but you will definitely have to build your projects from the ground up since they are not included.
#2
12/24/2008 (8:49 am)
Cool, thanks David. Do you mean I would need to create my own makefiles when you say building from the ground up? That's not a problem, I've done that kind of thing before. As long as the cpp/h files are logically laid out and where I can find them, I'm not worried about that.

I think I'm about sold :) I'll give it another day or two to see if anyone else has any tips, but if there is no one saying it can't be done, I should be good to go.
#3
12/24/2008 (11:16 am)
I did not know if Builder used Makefiles, projects, solutions, or whatever it decided to call them. The last version of Borland I used was Turbo C way back in the day. TurboVision was an awesome DOS window framework!
#4
12/24/2008 (12:36 pm)
Can C++ Builder import .vcproj files for VC7 or Visual Studio 2005? If so, you may not even have to create your own projects from scratch.
#5
12/24/2008 (5:31 pm)
Yeah, you are right David, they are actually called project files now. I'm just used to calling them MakeFiles from old habit. Same thing though :) In all honesty, you don't even use them directly anymore. Everything is meant to be done through the IDE (files to compile, options used and all that). The compiler handles keeping the ProjectFile up to date. I guesss MSVC does the same thing now, doesn't it?

Sherman, I don't know if it will import .vcproj files. It might. I've never tried it. Kind of doubt it though. It's not an option in the drop down list of file types.

But as I said, I'm not at all worried about that. The sort of things I worry about are compiler specific code. For instance, Borland Builder will choke on this code, which you often see in code written for MSVC compilers

unsigned int j=0;

for (unsigned int i=0; i<10; i++)
{
..some stuff..
}

j = j+i;

Borland considers i after the loop to be undefined (as per ANSI standard) and will give a compiler error on the last line, while MSVC considers that to be perfectly legal. So it all depends on how the code was written. That's just one example of the kind of differences that might cause me issues. If it was written to ANSI specifications, I should be okay (Builder is pretty ANSI compliant, though not perfectly so). If it was written only to work in MSVC, I could have a problem.
#6
12/24/2008 (6:01 pm)
TGEA compiles and is supported under XCode (GCC) and Visual Studio. Your mileage under other environments may vary... at the very least you'll have to setup/import the projects. I also have no idea on DirectX SDK's etc under Borland's compiler.
#7
12/24/2008 (9:40 pm)
The DirectX SDK works fine under Borland if you know what you are doing. Been using them for years :)

So I'm taking a gamble on if I could compile the engine or not. Bummer. I'll try to do some more research and see if there might be a definitive answer on this out there somewhere.
#8
12/25/2008 (7:35 am)
Ron:

Since TGEA compiles under GCC [on the Mac] as well as Visual Studio, the vast majority of the TGEA codebase should be fine. I'm not familiar with Borland - are templates fairly well supported? That's one area of potential issues I've encountered with other compilers.

TGEA also includes a project generator system which is designed to abstract the configuration of the engine to allow generation of both Xcode and Visual Studio projects from the same config files. Essentially you'd create a template for the Borland project, modify the config giles if necessary, and then tell the project generator to build the Borland project. Might be something to consider depending on the format of the Borland projects [binary or text?] and your level of comfort with PHP [w/smarty template system].
#9
12/25/2008 (12:23 pm)
Oh, it definitely supports templates fairly well. At least, I've never run into a problem with them :) About four or five years ago I converted a template heavy program that was written for MSVC over to my version of Builder. It needed an extra semicolon at the end of the templates for some reason (which I think was a compiler bug if you go by the strict ANSI interpretation), but that's not a big deal. That may even have been fixed in the meantime, since I have upgraded compilers since then.

I think what I'm probably going to do is go ahead and buy the TGEA package. If, by some chance, I simply can't get it to work with my good compiler, I suppose I'll bite the bullet and download the MS freebee one just for this use. So either way, I won't be throwing away $300, heh.

But hopefully I can get it to work on Builder with little (or no?) problem. That would make me happiest. We'll see what happens.

I'm fairly excited about this. I've been coding 3D engines forever, with varying degrees of success, and I feel like I want to build a game already, heh. I've got my modeller (truespace) and my UV mapper (UU3D) which I've been working with lately, and I think I'm ready to get serious aboiut this. I even ordered Mr. Maurina's first book so I can get up to speed on how to use everything. Very exciting!