Game Development Community

Compiling Torque with Eclipse

by mm · in Torque Game Engine · 01/02/2004 (9:05 am) · 82 replies

I have been compiling my TGE project with MSYS and minGW. After I saw the dev shot that Ron posted I took a further look at Eclipse. I must say that running through Eclipse when compiling is far more reliable and much less frustrating.

I would really like to see Eclipse used more since it really is a valuable tool for the community. While looking into Eclipse I really didn't see any tutorials on how to get it set up. And while a large portion of the community should be able to get it set up without any problems I thought I would write a step-by-step tutorial for those who might have trouble compiling.

The method I used to set up may not be the most efficient method but it hasn't given me any trouble thus far and the TGE compiles every time. Below I have laid out the steps that I used when setting up Eclipse. Thanks Ron and all those that got this resource up and running!
#61
09/19/2004 (3:48 am)
Do a forum search for "No exe"
#62
09/24/2004 (6:16 pm)
First, thanks to Ron and Matt for the effort they put into this!

Now, for my (admittedly newbie) question... I seem to be having the same problem as Donny, Joshua, Mike and Alfredo posted. When I try to 'Build All' from within Eclipse there's a quick window that pops up, then nada. Strange thing is that it worked before I went to work, then I wanted to test it without starting msys first, now I can't get it to work either way. I tried Jeff Houck's manual method, and that worked fine. Any insight would be greatly appreciated!

Installed: (latest versions as of 24th Sept 04)
MinGW-3.1.0-1 (installed first)
MSYS-1.0.10
Eclipse 3.0.1
Eclipse cdt 2.0.2

running winXP pro. Jeff also mentioned putting some of Ron's files into the Eclipse dir. What's that about?
quote:
"Be sure to follow Ron Yacketta's instructions to the letter and that the eclipse/mingw resource file he has so graciously provided is unzipped into the Eclipse top directory."

That was the first I'd heard that anything from the 4948.project.zip should be placed into eclipse... I put them into the torque dir and mk/tools dirs, as Matt wrote.

p.s. this is independent of any reply to my Q, since this is my first post, I would just like to say how impressed I am with the community GG has. I've been lurking the forums for a while now and it's ultimately what sold me on buying the engine. hmm, 4.30 am, maybe I should sleep...
#63
05/25/2005 (3:27 pm)
Hi! who can i get out the window console when a run the exe , using the mingw , any compiler options ? using VC i can do "subsytem...." or something , but i dont know how to do that in Mingw
thanks in advance...
#64
05/25/2005 (4:23 pm)
Could you rephrase the question a bit, or tell us a little bit more about your problem? Are you talking about a MS Windows "command window", the Torque Console that happens when you press the ~ key, or something else?
#65
05/25/2005 (4:30 pm)
Its referred to MS Windows "command window",

Thanks
#66
05/25/2005 (4:45 pm)
Its referred to MS Windows "command window",

Thanks
#67
05/25/2005 (4:58 pm)
It sounds actually as if your executable is either:

1) Hanging (probably not the case),
2) Running in minimized mode (possible),
3) Getting caught up trying to get screen focus.

Try hitting alt-enter and seeing if you get a change, or going down to your task bar and clicking on the "other" torque application bar and see if you can bring it up that way.
#68
05/31/2005 (10:53 am)
Installed the TBE on a Win2K box, and while I can compile the included Torque files just fine, I run into problems when importing other *.cc and *.h files. Whenever I try to rebuild the torqueDemo.exe, Eclipse simply ignores the imported files as if they weren't there. Cleaning up and rebuilding from scratch has no effect.

I added the files using File->Import->File System, and they show up in the workspace tree like the other files. Is there another step that I'm missing?

EDIT: Fixed my problem. Manually added the files to the engine\targets.torque.mk list.
#69
05/31/2005 (11:55 am)
Torque in Eclipse uses a Makefile to manage files for compile.

The file should be

C:\Torque\SDK\engine\targets.torque.mk
#70
05/31/2005 (11:56 am)
You could have also setup eclipse to use managed make files, then when you add a file, it's automagically in the targets.*.mk file.
#71
06/04/2005 (11:02 am)
I've spent much time trying to compile the engine with Eclipse, MinGW, MSYS & Ron's files.
I haven't successed... The 1 and only solution i've found, is:
- Install the Torque SDK using the installer
- Install TBE
- Upgrade Eclipse and the CDT plugin
- Install TorquEDIT for Eclipse
- Use Eclipse's CVS to get the HEAD

Now, all is working!
And with only Eclipse, i can compile the engine, debug, make my scripts, and update using its own CVS. Great !
No more WinCVS, TIDE, ConTEXT, ... now it's all in one for me :)
#72
08/23/2005 (12:50 am)
Elcipse 3.1 is out, if you haven't tried it out yet, go get it NOW, its a joy.

much faster, and all sorts of wish list features that just blow away any ide i've ever worked with.
#73
09/25/2006 (10:45 pm)
Firstly, thankyou for this resource - both Matt and Ron! Unfortunately, I'm having a similar problem to the one a few others are having, and I can't get my head around why... I have followed this walkthrough to the letter where possible, and I've tried some different ways of doing things, all to no avail. Now, I'm new to Torque and compilers, so I'm fresh meat, and I really hope that what I'm experiencing is entirely MY fault... That way I can find a fix for it. Here's what I've done so far, and I apologise in advance for the length of this post, but I wanted to make sure there were no misunderstandings here.

1. Install "Torque Build Environment". (TorqueBuildEnvironment-v0.6.0.exe)
- This installs by default to C:\TBE and includes:
- JRE Locate and Set Path and Classpath Section
- Mingw
- MSYS
- Eclipse IDE
- Torque make files

2. Install TGE SDK (TorqueGameEngineSDK-1-4.exe)
- This installs by default to C:\Torque\SDK

3. At this point I like to reboot...

4. I Run MSYS which is now found at C:\TBE\msys\1.0\msys.bat and cd to my Torque "root" directory - C:\Torque\SDK by typing:
cd /c/torque/sdk

5. Now I type: make -f mk/configure.mk OS=WIN32 BUILD=RELEASE COMPILER=GCC3
and I get this:

Current Configuration: this config is VALID
OS: WIN32
COMPILER: GCC3
BUILD: RELEASE
DIR.OBJ: out

To change the current configuration type:

make -f mk/configure.mk {arguments, ...}

required arguments:
OS={WIN32 BEOS LINUX OpenBSD FreeBSD Solaris}
COMPILER={CW6 VC6 GCC2 GCC3}
BUILD={DEBUG RELEASE}

optional arguments:
DIR.OBJ={path to store intermediate obj files}

Note: all arguments are case sensitive.

6. Then I cd to the Eclipse directory, which by default is: C:\TBE\Eclipse\eclipse by typing the following:
cd /c/tbe/eclipse/eclipse

7. And then:
./eclipse &

That will launch Eclipse straight from MSYS. As soon as it's open I see that Torque is preloaded by default. Nice!

8. I would normally Update Eclipse via Help->Software Updates->Find and Install, but I'm not online at home, and my versions are all current anyway, so I keep going.

9. Now, I simply select Project->Build All and Eclipse will start compiling.

At this point I get exactly 100 errors in the console. I was expecting to find an .exe in my C:\Torque\SDK\example directory, and to make certain it was compiling properly I moved the TorqueDemo .exe from the dir before compiling, thnking that would be a good way of making sure everything went well. Alas, there is NO such .exe there now. *sigh* At least I had the smarts to back it up first.

After trying to compile with only MSYS/Mingw I get the following output:

kaff@HOME ~
$ cd /c/torque/sdk

kaff@HOME /c/torque/sdk
$ make -f mk/configure.mk OS=WIN32 BUILD=RELEASE COMPILER=GCC3

Current Configuration: this config is VALID
OS: WIN32
COMPILER: GCC3
BUILD: RELEASE
DIR.OBJ: out

To change the current configuration type:

make -f mk/configure.mk {arguments, ...}

required arguments:
OS={WIN32 BEOS LINUX OpenBSD FreeBSD Solaris}
COMPILER={CW6 VC6 GCC2 GCC3}
BUILD={DEBUG RELEASE}

optional arguments:
DIR.OBJ={path to store intermediate obj files}

Note: all arguments are case sensitive.


kaff@HOME /c/torque/sdk
$ make
mkdir: cannot create directory 'out.GCC3.RELEASE/gui/containers': No such file o r directory
make[1]: *** [out.GCC3.RELEASE/gui/containers] Error 1
make: *** [default] Error 2

10. Repeat steps 1 - 9 again, in case I had done something wrong.

If anyone can help me I would really appreciate it, and thankyou in advance to anyone who even reads through all this :)

Dan (kaff)
#74
10/27/2006 (11:20 pm)
Is anyone still reading this thread?
#75
10/28/2006 (1:27 am)
It's been mentioned in quite a few other threads, but now that Visual Studio Express is free, the Torque Build Environment is depricated and no longer supported.
#76
10/28/2006 (5:25 am)
Nooo!!! i love eclipse isnt it anymore supported?
#77
10/29/2006 (5:50 pm)
Hmmm, my problem with VS is that I can only find an installer which wants to get online and start installing it. That's fine, but I don't have a net connection (I know, in this day and age it's almost unheard of!), but I'll be back online soon I hope. In the meantime I'll see if I can find a third party hosting site for the actual app.
#78
12/16/2006 (3:37 pm)
I have a funny problem. After installing MSYS and minGW, I run MSYS and type the final setup step "make -f.." and it says "command not found"
#79
01/23/2007 (5:18 pm)
Andrew, you need to edit the fstab in /msys/1.0/etc/fstab to include an entry for mingw. There is already an example and I just commented out the perl example and renamed the file fstab instead of fstab.example
#80
02/22/2007 (7:26 am)
I have run through the tutorial, and everything seems fine, except for I get this in the Problems tag in Eclipse after a rebuild:

../lib/openal/LINUX/al/alc_func.h error: 'ALCcontext' was not declared in this scope

adding #include "acltypes.h" should fix this, but it doesn't unless I comment the #if and #endif in acltypes.h

#if !defined(_WIN32)
struct _AL_device;
typedef struct _AL_device ALCdevice;

typedef void ALCcontext;
#endif /* _WIN32 */

and even with this I'm getting this
make: *** [default] Error 2		Torque	line 0	1172158186484	7121

has anybody ran into something like this?