Definitive Resource for TBE and Eclipse in demand
by Andy Hawkins · in Torque Game Engine · 08/15/2005 (6:24 pm) · 25 replies
I've been trying to write a tute to help out people getting Torque to compile using the TBE and Eclipse IDE suite of tools. So far it's way too complicated for people to understand. I can get Torque compiling in Vis Studio 6 but Eclipse is failing at mainly using the vorbis code, mainly concerned with be unable to link codec.h. But there's other stuff as well for example the main resource if you follow the instruction "no-brainer" solution doesn't work "out of the box". There's even hacks to the config file which most people would have problems with.
Can someone provide clear information of fixing these issues with vorbis and other things involved with getting TBE running - email me if you want so I can consolidate all this info.
In doing so I think we need a dedicated resource purely to getting TBE and Eclipse to compile. It should not be just, click on this forum to resolve this issue, and then try this, and then try this... because I've been running around in circles doing this, ending up in old resources and mixed information.
To the newer user this is way too complicated.
The structure of the Resource should be like this...
a) Where to get all the stuff
b) How to configure it - even providing make file and config changes so the user doesn't have to hack anything.
c) Support for Linux, Max and Win32
d) Link to a new forum to iron out any issues.
I believe an almost "one-click" solution can be provided if we get it right.
Can someone provide clear information of fixing these issues with vorbis and other things involved with getting TBE running - email me if you want so I can consolidate all this info.
In doing so I think we need a dedicated resource purely to getting TBE and Eclipse to compile. It should not be just, click on this forum to resolve this issue, and then try this, and then try this... because I've been running around in circles doing this, ending up in old resources and mixed information.
To the newer user this is way too complicated.
The structure of the Resource should be like this...
a) Where to get all the stuff
b) How to configure it - even providing make file and config changes so the user doesn't have to hack anything.
c) Support for Linux, Max and Win32
d) Link to a new forum to iron out any issues.
I believe an almost "one-click" solution can be provided if we get it right.
#2
I guess the easy way is to start...
a) Can someone please provide information on overcoming Eclipses vorbis linking problems.
08/15/2005 (11:08 pm)
Well I'll do it - but I need help to resolve all the issues with getting TGE and Eclipse to work out-of-the-box. It's possible I could write a console program to handle all the setup.I guess the easy way is to start...
a) Can someone please provide information on overcoming Eclipses vorbis linking problems.
#3
MSYS command line:
cd /c/torque/sdk
make -f mk/configure.mk OS=WIN32 COMPILER=GCC3 BUILD=RELEASE
make
The end result is an executable compiled in release mode. The availability of X86 inline assembly is handled via preprocessor defines, and has nothing to do with wether or not you use a makefile. You shouldn't be having any problems with that.
What issues are you having with linking Vorbis?
08/16/2005 (6:22 am)
I've not used TBE, but I've been able to compile Torque with MingW (which is the compiler TBE uses, IIRC) using Msys without any problem whatsoever.MSYS command line:
cd /c/torque/sdk
make -f mk/configure.mk OS=WIN32 COMPILER=GCC3 BUILD=RELEASE
make
The end result is an executable compiled in release mode. The availability of X86 inline assembly is handled via preprocessor defines, and has nothing to do with wether or not you use a makefile. You shouldn't be having any problems with that.
What issues are you having with linking Vorbis?
#4
08/16/2005 (6:35 am)
It fails to #include "vorbis/codec.h" and then the typical typedef errors start and subsequent related errors are spouted because of the definitions not found (which are in codec.h obviously)
#5
Specifically 'opengl2d3d' is a good example of a segment of TGE that has inline x86 assembly. Could you double check that GNU GCC can compile it and post how?
This was the only issue I had with compiling TGE via GNU GCC with CodeBlocks as the IDE.
B--
EDIT: @Andy: I'm not sure what you are asking for? You seem to know the files that need to be included? Are you wondering where the #include goes?
08/16/2005 (8:10 am)
@Mike: I've spent very little time with open source compilers. so could you elaborate on the 'pre-processor' defines that enable GNU GCC to compile x86 inline assembly?Specifically 'opengl2d3d' is a good example of a segment of TGE that has inline x86 assembly. Could you double check that GNU GCC can compile it and post how?
This was the only issue I had with compiling TGE via GNU GCC with CodeBlocks as the IDE.
B--
EDIT: @Andy: I'm not sure what you are asking for? You seem to know the files that need to be included? Are you wondering where the #include goes?
#6
08/16/2005 (12:48 pm)
Andy - Are you using the code from the download? CVS? if CVS what branch.
#7
08/16/2005 (3:21 pm)
@Andy: Thanks a lot for putting energy into TBE tutorials!! Please keep us informed of your progress and what kind of help you need. Did you get your compile going yet?
#8
@ Harold - to even the playing field I'm using the Torque 1.3 SDK that everyone got shipped so there's a common starting point. I recognise that some people wont know how to use CVS so that's why I went with this version.
@ Chris - no problem - I can see the light at the end of the tunnel on this (resource imminent) And no I haven't got the compiler going yet but if Brandon comes through I should be able to solve this.
08/16/2005 (11:17 pm)
@ Brandon - I don't know how to modify Eclipse to include the Vorbis header - it must be a properties setting like in Visual Studio@ Harold - to even the playing field I'm using the Torque 1.3 SDK that everyone got shipped so there's a common starting point. I recognise that some people wont know how to use CVS so that's why I went with this version.
@ Chris - no problem - I can see the light at the end of the tunnel on this (resource imminent) And no I haven't got the compiler going yet but if Brandon comes through I should be able to solve this.
#9
If you can't get it working, I have a 'blank' system I can dig out of storage and attempt to run TBE on. It has nothing on it but windows, so I could find out 'exactly' what is needed for TBE to compile.
If Mike will come through all this could be avoided by using CodeBlocks with GNU GCC to compile and debug TGE without make files! Just need to get past GCC not wanting to chew up x86 inline assembly.
B--
08/17/2005 (6:50 am)
@Andy: I'm wondering if you have all the SDK's installed? I had never used TBE before, but wanted to make a tutorial on integrating Tom Spilmans debugger. TBE was a one click and compile solution with TGE1.3 for me. I even added the enhanced debugger and recompiled without any issues? There has to be something your system is missing.. The system I'm using has the openAL SDK, win32 SDK, and directX SDK installed in it. Just out of curiosity; do you have openAL and ogg/Vorbis SDK installed?If you can't get it working, I have a 'blank' system I can dig out of storage and attempt to run TBE on. It has nothing on it but windows, so I could find out 'exactly' what is needed for TBE to compile.
If Mike will come through all this could be avoided by using CodeBlocks with GNU GCC to compile and debug TGE without make files! Just need to get past GCC not wanting to chew up x86 inline assembly.
B--
#10
If that's the solution where do I find the Vorbis SDK?
08/17/2005 (5:45 pm)
@Brandon - if I was compiling in Visual C++ I could just add the path to the codec.h in the directories tab - but in Eclipse I can't find this kind of dialog. But what's ogg/Vorbis SDK install you are talking about? I haven't come across that yet - maybe this is the issue. I have only installed TGE 1.3 SDK, then TBE ontop and got stuck on the Vorbis problem. If that's the solution where do I find the Vorbis SDK?
#11
If I get some free time this weekend I'll try and install TBE/TGE on a blank system to see exactly what SDK's are required for compiling.
Surely there are some TBE/Eclipse guru's around here!?!?! Where are you guys?
I agree with you Andy, it would be nice to have a resource to help new users out. If you want, could you send me an email of the entire error log / dump of the failed session. I still have TBE and Eclipse installed from doing the quickClip tutorial, so possibly it would help me to find your problem.
B--
support@smdlabs.com
08/17/2005 (8:14 pm)
@Andy: I'm not sure if it is needed, but it is here www.vorbis.com/download_win_1.0.1.pspIf I get some free time this weekend I'll try and install TBE/TGE on a blank system to see exactly what SDK's are required for compiling.
Surely there are some TBE/Eclipse guru's around here!?!?! Where are you guys?
I agree with you Andy, it would be nice to have a resource to help new users out. If you want, could you send me an email of the entire error log / dump of the failed session. I still have TBE and Eclipse installed from doing the quickClip tutorial, so possibly it would help me to find your problem.
B--
support@smdlabs.com
#12
EDIT 1: Fresh install - got errors to do winGl.cc and cPrecipitationmodifyStorm * In function *void - read forum here...
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=7362 (search for Mark Joyal and Mark Storer comment)
... and commented out #include "platform/3Dfx.h" in winV2Video.cc. Recompiled.
EDIT 2: Yeah that didn't work - even more errors looking for 3dfx defines (of course)... oh well... took out comment and recompiled again.
EDIT 3: Same errors as above - but it generates the Torque Demo (in both Edit1 and Edit 3) So why the errors? No vorbis problems on this machine.
Next Step is to include telnetdebugger into Eclipse
@Brandon - why am I getting the error in EDIT1 but Torque still compiles?
EDIT4: Added TelnetDebugger. Recompiled in a release version of Torque in Eclipse - worked out - but I can't figure out how to make a debug version of Torque in Eclipse (interface is not user friendly)
@Brandon - where is that secret menu that allows me to change from Release to Debug version in Eclipse?
08/17/2005 (10:11 pm)
Yes I will do that (send you the log) - I've got clean system here at work - I'll do what you propose to do as well and send my results from that. Theoretically it will cause the same problem.EDIT 1: Fresh install - got errors to do winGl.cc and cPrecipitationmodifyStorm * In function *void - read forum here...
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=7362 (search for Mark Joyal and Mark Storer comment)
... and commented out #include "platform/3Dfx.h" in winV2Video.cc. Recompiled.
EDIT 2: Yeah that didn't work - even more errors looking for 3dfx defines (of course)... oh well... took out comment and recompiled again.
EDIT 3: Same errors as above - but it generates the Torque Demo (in both Edit1 and Edit 3) So why the errors? No vorbis problems on this machine.
Next Step is to include telnetdebugger into Eclipse
@Brandon - why am I getting the error in EDIT1 but Torque still compiles?
EDIT4: Added TelnetDebugger. Recompiled in a release version of Torque in Eclipse - worked out - but I can't figure out how to make a debug version of Torque in Eclipse (interface is not user friendly)
@Brandon - where is that secret menu that allows me to change from Release to Debug version in Eclipse?
#13
[edit] I just did a fresh install of TGE and I notice thoe Eclipse project files ain't included, so you need to copy the ones that TBE install to you hdd. c:/torque by default. Just grab everything and dump it over your TGE install. Notice that there where a v0.5.0 of TBE, the latest seems to be v0.6.0.
To include new cc files in your project you'd need to edit engine/targets.torque.mk , that is also where you can change the name and destination for the compiled exe.
To tell the compiler about more include paths (h files, like the lib\vorbis\include you'd have to go into the makefiles as well, I notice this one for example >> engin/targets.torque.mk
INCLUDES_BASE = -I../lib/zlib -I../lib/lungif -I../lib/lpng -I../lib/ljpeg -I../lib/directx8 -I../lib/vorbis/include
This is all on the windows platform (since that is the one I work on) but should be similar for linux.
I was also looking for some place I could set all these paths in Eclipse like you do in VC when I moved to Eclipse from VC until I realised that with an environment that could support any compiler/language you would probably not have such a single location to edit these paths.
08/17/2005 (11:51 pm)
I installed TGE1.3 (the downloadable installer, not from CVS), and TBE v0.6.0 and it all compiled without a hickup. I didn't copy the TBE's Torque project/make files over my install of TGE (if that is what you perhaps did) since TGE allready included that (don't know about the one avail from CVS). [edit] I just did a fresh install of TGE and I notice thoe Eclipse project files ain't included, so you need to copy the ones that TBE install to you hdd. c:/torque by default. Just grab everything and dump it over your TGE install. Notice that there where a v0.5.0 of TBE, the latest seems to be v0.6.0.
To include new cc files in your project you'd need to edit engine/targets.torque.mk , that is also where you can change the name and destination for the compiled exe.
To tell the compiler about more include paths (h files, like the lib\vorbis\include you'd have to go into the makefiles as well, I notice this one for example >> engin/targets.torque.mk
INCLUDES_BASE = -I../lib/zlib -I../lib/lungif -I../lib/lpng -I../lib/ljpeg -I../lib/directx8 -I../lib/vorbis/include
This is all on the windows platform (since that is the one I work on) but should be similar for linux.
I was also looking for some place I could set all these paths in Eclipse like you do in VC when I moved to Eclipse from VC until I realised that with an environment that could support any compiler/language you would probably not have such a single location to edit these paths.
#14
Hope this helps. It would be nice to figure out what the issues were with vorbis on the first system. I'm sure there are many others having those same , or similar problems.
I'm still hoping Mike will come through and post some answers about GNU GCC and inline x86 assembly! CodeBlocks, with GCC for compiling and debugging without make files would be great for all the people who can't drop $100 for VisualC++
B--
08/18/2005 (4:26 am)
@Andy: Looks like you have been busy! Good job on the progress. As for 'debug' and 'release' version control, Mike answered that above. Here is the quote:Quote:
MSYS command line:
cd /c/torque/sdk
make -f mk/configure.mk OS=WIN32 COMPILER=GCC3 BUILD=RELEASE
make
Hope this helps. It would be nice to figure out what the issues were with vorbis on the first system. I'm sure there are many others having those same , or similar problems.
I'm still hoping Mike will come through and post some answers about GNU GCC and inline x86 assembly! CodeBlocks, with GCC for compiling and debugging without make files would be great for all the people who can't drop $100 for VisualC++
B--
#15
Note the COMPILER.asm line which defines nasmw.exe; which is an x86 assembly language compiler. Again, if you know how to setup GCC to handle this, please share. I have read some pages from Google that suggest GCC can output, or somehow handle x86, so if you could elaborate it would be very appreciated!
B--
EDIT: Andy, FYI: There are some vorbis lib defines in this file as well.
08/18/2005 (4:36 am)
@Mike: If you are wondering why I said I thought the make files were used to define another compiler for assembly, and not pre-compiled headers; here is a section of code from the conf.GCC2.WIN32.mk make file.COMPILER.c =gcc COMPILER.cc =g++ COMPILER.asm =../bin/nasm/nasmw.exe LINK =ar LINK.cc =ld
Note the COMPILER.asm line which defines nasmw.exe; which is an x86 assembly language compiler. Again, if you know how to setup GCC to handle this, please share. I have read some pages from Google that suggest GCC can output, or somehow handle x86, so if you could elaborate it would be very appreciated!
B--
EDIT: Andy, FYI: There are some vorbis lib defines in this file as well.
#16
1. Installed Torque SDK 1.3 (download version)
2. Installed Torque Build Environ. 0.6.0 (TBE)
3. Opened Eclipse, made a new project, tried to buiid - said no make target existed (or something)
4. Used Mike Parker's suggestion, opened Msys command line utility (uses MingW to compile - same as Eclipse) and typed in...
5. Added TelnetDebugger update for TGE1.3 (entire engine folder provided)
6. Tried to compile this using Eclipse thinking the MingW success might have made a decent make target - NUP! Closed Eclipse
7. Ran Msys and typed in the following...
8. Installed Torsion Alpha.
9. Created new project in Torsion using release build from above steps.
10. Pressed F5 to run, opened console and typed "echo($dbgversion); which reported 2 (sweet!)
11. Set a break point at OnServerCreated in starter.fps/server/scripts/games.cs,pressed F5 and it stopped at line, pressed F10 to step through - all works.
SOOO.... Eclipse seems to have a few issues out of the box when compiling Torque (well in my universe at least).
Can anyone help me get solve these problems? I'm going to bed - and will go back through everyone's comments tomorrow and see if I can get Eclipse to compile out of the box.
08/18/2005 (8:11 am)
Okay starting from scratch again for all those watching this thread ;-)1. Installed Torque SDK 1.3 (download version)
2. Installed Torque Build Environ. 0.6.0 (TBE)
3. Opened Eclipse, made a new project, tried to buiid - said no make target existed (or something)
4. Used Mike Parker's suggestion, opened Msys command line utility (uses MingW to compile - same as Eclipse) and typed in...
MSYS command line: cd /c/torque/sdk make -f mk/configure.mk OS=WIN32 COMPILER=GCC3 BUILD=RELEASE makeand BOING! Compile-arino! One TorqueDemo.exe done.
5. Added TelnetDebugger update for TGE1.3 (entire engine folder provided)
6. Tried to compile this using Eclipse thinking the MingW success might have made a decent make target - NUP! Closed Eclipse
7. Ran Msys and typed in the following...
make clean makeand BOING! Compile-arino number 2.
8. Installed Torsion Alpha.
9. Created new project in Torsion using release build from above steps.
10. Pressed F5 to run, opened console and typed "echo($dbgversion); which reported 2 (sweet!)
11. Set a break point at OnServerCreated in starter.fps/server/scripts/games.cs,pressed F5 and it stopped at line, pressed F10 to step through - all works.
SOOO.... Eclipse seems to have a few issues out of the box when compiling Torque (well in my universe at least).
Can anyone help me get solve these problems? I'm going to bed - and will go back through everyone's comments tomorrow and see if I can get Eclipse to compile out of the box.
#17
08/19/2005 (4:31 pm)
Just adding this for my own reference.Quote:Those six errors are not real errors. TBE has problems with the complex linking structure of Torque and will spit out those six errors but if you double-click on them you will notice that they don't take you to any actual errors. If you go look, you will also notice that it did in fact build a new .exe in your examples folder.Original TBE Getting Started...www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=7362
#18
Grab the tut and files here...
www.drewfx.com/Torque/TorqueIDE_HelpVersion2.zip
08/20/2005 (7:23 am)
ALRIGHTY THEN! Problem solvered! I need some peer reviewers for the tute before I go live with this so please grab the tut from here and email me if you have any problems. I'm also looking for someone to provide the alternate instructions to do the same thing on Linux and Mac please.Grab the tut and files here...
www.drewfx.com/Torque/TorqueIDE_HelpVersion2.zip
#19
08/22/2005 (2:32 pm)
Hey, good job Andy! Your tutorial looks great! Sorry I dropped off this thread, was away in CA for a wedding. Looks like you got it all worked out, though. Thanks for the good work!
#20
08/22/2005 (3:46 pm)
Thanks. But I still need people to double check this tut works and when I get a few confirmations I will convert it into a resource for everyone else to use. So c'mon guys and gals! Test away please :)
Torque 3D Owner Brandon Maness
The main problem I hit was inline assembly. GNU GCC uses ATA&T based, but TGE has some sections coded in Intel based inline assembly. I think this may be the one of the reasons TBE/Eclipse uses make files to build TGE.
I didn't run into any Vorbis issues, but I do have numerous SDK's installed on this system. This might not be entirely related to what you are trying to do, as I was looking for a way to build TGE without make files. I think I could have gotten GNU GCC to build TGE without make files if the inline assembly files were converted to AT&T style.
I would be shocked if anyone steps up to the plate to tackle that one! But who knows? Any takers?
B--