The (Hopefully) Official Compile TSE in Eclipse with GCC Thread
by Robert Rice · in Torque Game Engine Advanced · 02/26/2005 (7:31 am) · 12 replies
OK, everyone. I'm trying to maintain my habit of using the Torque Build Engine (the Eclipse/GCC hybrid) to compile my projects in Windows. So, for starters, I replaced the files from Tim Gift's "Eclipse Project for Torque" for the appropriate ones in my TSE project (.cdtprojetc, .project, conf.GCC.*, and targets.map2dif.mk).
MSYS and CDT are already set up from running the Torque Build Engine install. I then went to my TSE directory and ran "make -f mk/configure.mk OS=WIN32 BUILD=RELEASE COMPILER=GCC3", which completed successfully. Even though I did not expect the build to run successfully the first time, I did not expect what I recieved.:
make -k all
make[1]: *** No rule to make target 'out.GCC3.RELEASE/audio/audio.obj', needed by 'out.GCC3.RELEASE/torqueDemo.exe'.
make[1]: *** No rule to make target 'out.GCC3.RELEASE/audio/audioBuffer.obj', needed by 'out.GCC3.RELEASE/torqueDemo.exe'.
......................................
and on and on.
Knowing full well that this will not be my final issue in thie effort, I am starting this thread in the hopes that any problems and their associated solutions can be posted here for all those interested to use. So, for starters, anyone have any idea why I am recieving these errors??? Thanks in advance!!!
MSYS and CDT are already set up from running the Torque Build Engine install. I then went to my TSE directory and ran "make -f mk/configure.mk OS=WIN32 BUILD=RELEASE COMPILER=GCC3", which completed successfully. Even though I did not expect the build to run successfully the first time, I did not expect what I recieved.:
make -k all
make[1]: *** No rule to make target 'out.GCC3.RELEASE/audio/audio.obj', needed by 'out.GCC3.RELEASE/torqueDemo.exe'.
make[1]: *** No rule to make target 'out.GCC3.RELEASE/audio/audioBuffer.obj', needed by 'out.GCC3.RELEASE/torqueDemo.exe'.
......................................
and on and on.
Knowing full well that this will not be my final issue in thie effort, I am starting this thread in the hopes that any problems and their associated solutions can be posted here for all those interested to use. So, for starters, anyone have any idea why I am recieving these errors??? Thanks in advance!!!
#2
02/26/2005 (11:03 am)
Thank you very much for that, Russ. I just made your changes and am copiling now. Even judging from the first few output lines, it is already an improvement.
#3
02/26/2005 (11:08 am)
This is a work in progress for me too, so as you encounter problems you can't fix easily, post here and I'll give a solution if I've fixed or worked around it already (since its the first time through, I haven't kept line by line details in my notes).
#4
In file included from gfx/gfxDevice.h:21,
from collision/gjk.cpp:10:
gfx/gfxTextureManager.h: In member function 'void
GFXTextureManager::deleteTexture(GFXTextureObject*)':
gfx/gfxTextureManager.h:201: 'GFXTextureManager::TextureManagerState' is not an aggregate type
make[1]: *** [out.GCC3.RELEASE/collision/gjk.obj] Error 1
Seem the praser does not like it.
I tried the HEAD and Release_0_2_0 Tags and both crap out here. Is there a workaround?
TGE compiles fine FYI.
Dave
EDIT: I removed (REM) the file from targets.torque.mk and it compiled to SOURCE.DGL=\ No files so REM then errors out on editor/creator.cpp \
03/05/2005 (3:49 pm)
I keep getting this error:In file included from gfx/gfxDevice.h:21,
from collision/gjk.cpp:10:
gfx/gfxTextureManager.h: In member function 'void
GFXTextureManager::deleteTexture(GFXTextureObject*)':
gfx/gfxTextureManager.h:201: 'GFXTextureManager::TextureManagerState' is not an aggregate type
make[1]: *** [out.GCC3.RELEASE/collision/gjk.obj] Error 1
Seem the praser does not like it.
I tried the HEAD and Release_0_2_0 Tags and both crap out here. Is there a workaround?
TGE compiles fine FYI.
Dave
EDIT: I removed (REM) the file from targets.torque.mk and it compiled to SOURCE.DGL=\ No files so REM then errors out on editor/creator.cpp \
#5
Paths to the directX libs and header files need to be added to these files as well. (i just added them to the /mingw includes directory because I am lazy).
I also got parse errors and such. I am tracking my errors on this thread:GCC3 bugs
In atlasHeightField.h, comment out these lines:
12/03/2006 (3:18 am)
Put -DUNICODE into conf.GCC3.WIN32.mk, under CFLAGS.GENERALPaths to the directX libs and header files need to be added to these files as well. (i just added them to the /mingw includes directory because I am lazy).
I also got parse errors and such. I am tracking my errors on this thread:GCC3 bugs
In atlasHeightField.h, comment out these lines:
static inline S32 lowestOne(const S32 x)
{
//#ifdef TORQUE_CPU_X86
// __asm {
// mov eax, 0
// bsf eax, x
// }
//#else
return x & - x;
//#endif
}
#6
Yes, apparently DGL has been removed, and it broke a few of the gui controls along the way.
12/03/2006 (12:48 pm)
Dave:Yes, apparently DGL has been removed, and it broke a few of the gui controls along the way.
#7
I'm about to start an attempt of building a Linux TGEA dedicated server, and could really use any help I can get. This sounds as close as "help" as I can expect.
Would any of you care to share your makefiles? I got a "null GFX module" (courtesy of some GG employees), so all I need to is get everything non-GFX compiled.
If any of you care to earn a little money, then I would even pay for a working makefile.
12/03/2006 (2:17 pm)
Hmmm - interesting thread.I'm about to start an attempt of building a Linux TGEA dedicated server, and could really use any help I can get. This sounds as close as "help" as I can expect.
Would any of you care to share your makefiles? I got a "null GFX module" (courtesy of some GG employees), so all I need to is get everything non-GFX compiled.
If any of you care to earn a little money, then I would even pay for a working makefile.
#8
12/03/2006 (4:39 pm)
I have the makefiles working, but many of the cpp files have problems (mostly header-related). I am working on a list of the problems with each file so the community can discuss fixes for them. A few of the problems are the same as TGE (i.e. redbook, unicode, etc.) But almost none of the shader code will compile. Some of the files require code which was originally in TGE but has since been removed.
#9
12/03/2006 (4:48 pm)
.
#10
12/03/2006 (5:40 pm)
The header and lib files in the directx sdk seem to work so far, but I haven't been able to do a full compile.
#11
02/16/2007 (5:22 am)
Thomas, any new on your linux dedicated server project?
#12
Just started on it again. After a loooong break, I managed to get a TGE 1.5 server building (for a different game). That gave me the needed push to start TGEA project again :-)
Havent progressed far yet - it starts compiling, but stops fast after a few files. So time to dig in :-)
03/16/2007 (1:36 pm)
Hey JosefJust started on it again. After a loooong break, I managed to get a TGE 1.5 server building (for a different game). That gave me the needed push to start TGEA project again :-)
Havent progressed far yet - it starts compiling, but stops fast after a few files. So time to dig in :-)
Torque Owner Russ Lunsford
There is also another thread I answered recently which details changes needed to support Visual Studio 2005 Beta edition for a large part of the source changes that need to happen.
The make rules have currently not been ported from TGE to TSE, which means the makefiles are still looking for .cc files instead of .cpp files.
Here are some quick notes regarding the makefile part of the change:
engine/targets.torque.mk
---------------------------------
everything .cc needs to be renamed .cpp
This is also the file you'll edit the most while trying to get everything to build as you can temporarily comment out a line if a file is giving you troubles, or hasn't been copied over to the TSE source tree yet. Some filenames/directories seem to have changed as well, so this will be a frequently edited file.
engine/Makefile:
----------------------
the section at the end needs to be changed to add %.cpp:
ifneq ($(MAKECMDGOALS),clean)
-include $(addprefix $(DIR.OBJ)/, $(addsuffix $(EXT.DEP), $(basename $(filter %.cc %.c %.cpp,$(SOURCE.ALL)))))
endif
in mk/conf.common.mk:
-----------------------------
modify line 2 add .cpp:
.SUFFIXES: $(O) $(EXE) $(DLL) .S .c .cc .cpp .h .asm .ash .y
insert around line 18:
$(DIR.OBJ)/%$O : %.cpp
$(DO.COMPILE.CPP)
mk/conf.GCC.mk:
----------------------
insert around line 18:
define DO.COMPILE.CPP
@echo "--> Compiling $(<)"
@$(COMPILER.cpp) $(CFLAGS) -I. $(PATH.H.SYS) -c -o $(@) $(<)
endef
mk/conf.GCC3.WIN32.mk:
---------------------------------
for a TBE environment, you should just be able to copy this file to TSE and add two lines (location should be obvious):
COMPILER.cpp =g++
LINK.cpp =g++