TORQUE 1.5.1 compilation OK on Ubuntu 7 after some fixes
by Philippe C · in Torque Game Engine · 04/09/2007 (2:14 pm) · 7 replies
The version 1.5.1 for windows could be compiled on LINUX but there is few issues to solve.
Below a summary of the update to do in the code.
-engine/gui/controls/guiTextEditCtrl.cc : fix the bug with type of variable
-engine/interior/fogCalc.h : replace FogCalc::FogCalc with FogCalc
-engine/interior/interior.h : replace TexMatrix::TexMatrix with TexMatrix
-engine/platformX86UNIX/x86UNIXFont.cc : comment the function GOldFont* createFont() {...}
-engine/targets.torque.mk :
--remove dgl/gNewFont.cc \
--add SOURCE.CONSTRUCTOR with constructor/constructorSimpleMesh.cc
--add util/triRayCheck.cpp to SOURCE.UTIL
for more information : eviwo.free.fr/torque/patch151.html
Below a summary of the update to do in the code.
-engine/gui/controls/guiTextEditCtrl.cc : fix the bug with type of variable
-engine/interior/fogCalc.h : replace FogCalc::FogCalc with FogCalc
-engine/interior/interior.h : replace TexMatrix::TexMatrix with TexMatrix
-engine/platformX86UNIX/x86UNIXFont.cc : comment the function GOldFont* createFont() {...}
-engine/targets.torque.mk :
--remove dgl/gNewFont.cc \
--add SOURCE.CONSTRUCTOR with constructor/constructorSimpleMesh.cc
--add util/triRayCheck.cpp to SOURCE.UTIL
for more information : eviwo.free.fr/torque/patch151.html
#2
I try to cast with (const UTF16 *) but I got a compilation error
the only definition that I found for linux is in x86UNIXStrings.cc :
It seems that there is different declaration depending on the platform
winStrings.cc
macCarbStrings.cc
04/10/2007 (2:42 pm)
AsmoloneyI try to cast with (const UTF16 *) but I got a compilation error
the only definition that I found for linux is in x86UNIXStrings.cc :
S32 dStrcmp(const char *str1, const char *str2)
{
return strcmp(str1, str2);
}It seems that there is different declaration depending on the platform
winStrings.cc
int dStrcmp(const char *str1, const char *str2)
{
return strcmp(str1, str2);
}
int dStrcmp(const UTF16 *str1, const UTF16 *str2)
{
return wcscmp(str1, str2);
}macCarbStrings.cc
int dStrcmp(const char *str1, const char *str2)
{
return strcmp(str1, str2);
}
int dStrcmp( const UTF16 *str1, const UTF16 *str2)
{
int ret;
const UTF16 *a, *b;
a = str1;
b = str2;
while( *a && *b && (ret = *a - *b) == 0)
a++, b++;
return ret;
}
#3
04/10/2007 (2:59 pm)
:. TGE 1.5.1 (Window$ SDK version) compiled on Mandriva PowerPack 2007, also. Based on the above instructions. Many thanks. However, I've got a fatal error on loading some missions with heavy use of the lighting system. Is it same over there?
#4
04/10/2007 (3:00 pm)
@Philippe: Copy the UTF16 version of dStrcmp() from macCarbStrings.cc into x86UNIXStrings.cc.
#6
04/14/2007 (12:28 pm)
Cool. I will add these changes to 1.5.2...
Torque Owner asmaloney (Andy)
Default Studio Name
The guiTextEditCtrl.cc fix is not quite right - you're casting a (const UTF16 *) to a (const char *) which is not the same thing. If you look in macCarbStrings.cc, you'll see a dStrcmp with the following declaration:
int dStrcmp( const UTF16 *str1, const UTF16 *str2)
Try copying that one into x86UNIXStrings.cc.