Game Development Community

Compiling with dev C++

by M Wiederhold · in Torque Game Engine · 04/11/2005 (5:30 pm) · 18 replies

I have the full TGE and i want to compile the source code.

i noticed that in the tutorials, they give instructions to compile it using VC++ along with makefiles and project files to make it easy.

I was wondering how i can compile it using the free compiler supplied by bloodshed.net which is DEV C++ 4.0

thank you

About the author

Recent Threads


#1
04/11/2005 (9:57 pm)
The project is too large for Dev-C++. Use the Torque Build Environment. It's a free Eclipse environment.
#2
04/12/2005 (12:50 am)
It seems like thats just a precompiled program of what i have.

i actually need to change what gets compiled. i have some other source files i need to add to the project so that wouldnt work for me.

any other ideas? maybe another compiler i can use that is free?

thanks for the reply tho
#3
04/12/2005 (12:54 am)
TBE is Eclipse + MinGW + Msys. It is a pre-configured IDE / Compiler for Torque... it's exactly what you asked for. You can add new sources, or edit ones that are there. And yes the TBE is free.
#4
04/12/2005 (7:39 am)
This is why I shouldn't try to answer questions.
#5
04/12/2005 (7:42 am)
Compilers often use special optomization techniques to speed up the code they are comiling. Is there a performance difference between games comiled with the TBE and games compiled with another comiler, specifically VC6?
#6
04/12/2005 (7:50 am)
Aside from compiler optimization features added to modern compilers over the last eight years since VC6 was released?
#7
04/12/2005 (7:53 am)
Is that a no... Not anything from the last 8 years is how I took that statement.
#8
04/12/2005 (8:00 am)
If optimization for anything that's come out in the last eight years isn't a concern, then there's no reason to upgrade to a modern compiler. The optimizations may be small, they may require flag settings, or they may be non-existent depending on the processor.

I personally can't imagine using VC6 anymore. And this is coming from someone who still tinkers with his Jaguar devkit.
#9
04/12/2005 (8:01 am)
Anything compiled on GCC is going to be faster than similar code compiled on VC.NET, VC 6+ and etc. I've never seen a program run faster unless it's written using something MS Specific like C# and then the point becomes moot. GCC is a better compiler all the way around IMHO.
#10
04/12/2005 (8:03 am)
And TBE uses GCC?
#11
04/12/2005 (8:12 am)
From the TBE link I posted:
Quote:TBE installs a customized distribution of MinGW and Msys, which contain the gcc compiler, gdb debugger, "make" utility, and other useful free unix-based utilities. It then installs Eclipse, which is a free Java-based code editing environment. Thanks to all these fantastic free tools, new users will be able to compile Torque without having to invest additional money in proprietary development tools.

Emphasis mine.

Now, I wouldn't say that gcc is always a more optimized compiler, but I would say that it is a more optimizable compiler (though VC can be heavily optimized if you break out of the IDE and work the command line).
#12
04/12/2005 (8:25 am)
Just for fun I decided to compare VC7 vs TBE, on a windows box here.

_______________________________________________
AMD Athlon 2200+XP
1G DDR SDRAM
ATI Radeon 9200 SE w/ 256mb
80G HD
Windows XP PRO SP2

Standard TBE
Visual Studio .NET Enterprise Architect Edition / VC 7.1
______________________________________________

With the default configurations my binary made with VC7 ran at an average 60fps. The binary made with TBE ran at 75fps.

GCC wins that round!

I wanted to compare the binary sizes as well, I got almost a 25% reduction in size using TBE compared to VC7.

GCC wins another round!

I timed clean compiles between TBE and VC7
8m37s for TBE 10m14s for VC7

GCC wins by TKO!

Enjoy!

PostScript...
I find it a little sad that a free program can beat the pants off my $4,000 IDE/Compiler.
#13
04/12/2005 (7:36 pm)
Does TBE include/support the DirectX SDK?

If not, the TBE version is going to be OpenGL only, unless I'm missing something somewhere.
#14
04/12/2005 (8:52 pm)
It includes everything that TGE itself does, plus a compiler and IDE. You can compile anything from the DX SDK regardless of whether you're using gcc, Visual Studio, or CodeWarrior. It's kind of like the confusion that people have over .NET 2k3 being a .NET only compiler, which is untrue.
#15
04/13/2005 (7:25 am)
What I meant was, is TBE set up to link in the DirectX libraries by default, or do you need to modify the configuration?

I was under the impression that using DirectX with GCC is not just a matter of downloading the standard SDK, but that you have to convert the .lib files or download one of the pre-converted DevPak versions (which are released by a third party several months after the standard SDK).

If the DirectX parts aren't being linked in, then I imagine the resulting executable would be smaller.

As for Microsoft's .NET compilers, I read on their site that the .NET SDK is part of the system requirements, and that is not available for Windows 98 (even though the runtime is).

Can you confirm that their .NET compilers will work without the .NET SDK on Win98 to compile the TGE/TSE source?
#16
04/13/2005 (7:55 am)
Thanks for the comprehensive comparison dreamer. i wish someone couldve told me that before i went out and bought visual studio though...

i think people have been having problems compiling with the synapse lighting pack under TBE. anyone here tried it wants to comment on their experience? if synapse works properly under TBE I may just toss my VS out the window.
#17
04/13/2005 (8:38 am)
I don't have a Windows 98 machine anymore (and haven't now for about 2 years) and have never thought about trying to install .NET 2003 on it. I've used Dev-C++ with DirectX before and don't remember having a problem (of course, that was a long time ago now). So on that, I'm not sure. But it seems that Intel, MetroWerks, Borland, etc would be screaming extremely loudly (as would the development houses that have sunk huge investments into their development platforms) if the DirectX SDK (or Windows API) wouldn't link correctly without Visual Studio. I thought the third party libraries were for cross-compiling and not native compiliation. I don't know, though. The IDE for .NET 2k3 itself makes use of the .NET Framework, and therefore you have to have the framework installed to use the IDE. You don't have to use the framework in your programs if you don't want to, though.

@Sean H
You can change a huge number of settings when it comes to optimization in Visual Studio, just like you can in gcc (though gcc admittedly has a lot more options). Part of the problem that people are having with the lighting pack and TBE is that they don't want to learn Eclipse. I see this with the T2D forums as well. When you start telling someone how to play with a make file or adding resources to a project, their eyes glaze over and they start screaming and pulling out their hair. They often want the tools to be made available, but don't want to learn the tools once they are. They just want them to work the way they expect. If it doesn't, then it's broken (much like the vorbis "problem" on the Mac). TBE's obviously broken, not their ability to use TBE.
#18
04/13/2005 (6:05 pm)
I've put off trying to set up DirectX on Win98 because it sounds as if the process is going to be a real pain. I've read that the latest version of version 9.0c doesn't work with VS 6, and that VS 7 and above won't run on Win98.

The DirectX SDK works with MetroWerks and Borland products as they use standard Windows library extensions on that platform. GCC uses different extensions for some reason, probably because it was a direct port from Unix.

I don't know if getting it to work is just a matter of changing the file extensions for all the files, but I've heard a command line utility is included to convert libraries for you.

The Dev-C++ IDE includes a "Check for Updates/Packages" option in the Tools menu, but I have no idea about Eclipse. The DevPaks are available separately and are supposed to be compatible with standalone versions of GCC, but as I mentioned before they take a while to be released.

Currently I use MSYS and MinGW on Win98 without DirectX support, which seems to work fine for TGE (I run it in OpenGL mode, obviously). Unfortunately, I have no way to compile TSE which is DirectX only, and was hoping switching to TBE might be a simpler option.