As I wrote in my Python thread I got Horde3D to compile using a cross compiler under Linux: mingw32.
To get this working I had to do the following:
Linker error, related to confusion between pow and powf:
Code:
diff --git a/Horde3D/Source/Horde3D Engine/egRenderer.cpp b/Horde3D/Source/Horde3D Engine/egRenderer.cpp
index d3a8823..6fc911f 100644
--- a/Horde3D/Source/Horde3D Engine/egRenderer.cpp
+++ b/Horde3D/Source/Horde3D Engine/egRenderer.cpp
@@ -729,7 +729,7 @@ void Renderer::updateShadowMap()
for( uint32 i = 1; i < numMaps; i++ )
{
float f = i / (float)numMaps;
+ float log = nearDist * pow( farDist / nearDist, f );
- float log = nearDist * powf( farDist / nearDist, f );^M
float uni = nearDist + (farDist - nearDist) * f;
_splitPlanes[i] = t * log + (1 - t) * uni;
wgl seems to be unsupported by mingw32:
Code:
diff --git a/Horde3D/Source/Horde3D Utils/main.cpp b/Horde3D/Source/Horde3D Utils/main.cpp
index be73011..b84a44a 100644
--- a/Horde3D/Source/Horde3D Utils/main.cpp
+++ b/Horde3D/Source/Horde3D Utils/main.cpp
@@ -22,7 +22,6 @@
//
// *************************************************************************************************
-
#include "Horde3D.h"
#include "utPlatform.h"
#include "utMath.h"
@@ -39,10 +38,6 @@
using namespace std;
+#ifdef __MINGW32__
+#undef PLATFORM_WIN
+#endif
+
namespace Horde3DUtils
{
ofstream outf;
case matters on Linux:
Code:
diff --git a/Horde3D/Source/Shared/utXMLParser.cpp b/Horde3D/Source/Shared/utXMLParser.cpp
index 235ade0..e0e498f 100644
--- a/Horde3D/Source/Shared/utXMLParser.cpp
+++ b/Horde3D/Source/Shared/utXMLParser.cpp
@@ -82,7 +82,7 @@
//#include <crtdbg.h>
//#endif
#define WIN32_LEAN_AND_MEAN
+#include <windows.h> // to have IsTextUnicode, MultiByteToWideChar, WideCharToMultiByte to handle unicode files
-#include <Windows.h> // to have IsTextUnicode, MultiByteToWideChar, WideCharToMultiByte to handle unicode files^M
// to have "MessageBoxA" to display error messages for openFilHelper
#endif
utImage.cpp produces many warnings regarding conversion from "const char *" to "char *", but it works.
All other changes are related to makefiles. Simply replacing g++ with i586-mingw32msvc-g++, changing names of library files etc.
And here's my problem: It's not that easy to integrate the changes to the makefiles into the existing build system. Other problems like being unable to specify the compiler on Linux with the usual CC or CXX environment variables is not possible. Parallel compilation with -jN is not really supported....
I'm interested in moving away from the makefile approach to a platform independent build system.