These changes make Horde3D compile properly with MinGW on Windows (using the MinGW which comes with Code::Blocks):
Code:
Index: Extensions/Terrain/Sample/CMakeLists.txt
===================================================================
--- Extensions/Terrain/Sample/CMakeLists.txt (revision 46)
+++ Extensions/Terrain/Sample/CMakeLists.txt (working copy)
@@ -1,9 +1,9 @@
include_directories(../Bindings/C++ ../../../Horde3D/Bindings/C++ ../../../Horde3D/Dependencies/Include)
-IF(WIN32)
+IF(MSVC)
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup ")
-ENDIF(WIN32)
+ENDIF(MSVC)
add_executable(Terrain WIN32 MACOSX_BUNDLE
app.h
Index: Horde3D/Samples/Chicago/CMakeLists.txt
===================================================================
--- Horde3D/Samples/Chicago/CMakeLists.txt (revision 46)
+++ Horde3D/Samples/Chicago/CMakeLists.txt (working copy)
@@ -2,9 +2,9 @@
include_directories(../../Bindings/C++)
include_directories(../../Dependencies/Include)
-IF(WIN32)
+IF(MSVC)
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup ")
-ENDIF(WIN32)
+ENDIF(MSVC)
add_executable(Chicago WIN32 MACOSX_BUNDLE
app.h
Index: Horde3D/Samples/Knight/CMakeLists.txt
===================================================================
--- Horde3D/Samples/Knight/CMakeLists.txt (revision 46)
+++ Horde3D/Samples/Knight/CMakeLists.txt (working copy)
@@ -2,9 +2,9 @@
include_directories(../../Bindings/C++)
include_directories(../../Dependencies/Include)
-IF(WIN32)
+IF(MSVC)
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup ")
-ENDIF(WIN32)
+ENDIF(MSVC)
add_executable(Knight WIN32 MACOSX_BUNDLE
app.h
Index: Horde3D/Source/Horde3DEngine/egCom.h
===================================================================
--- Horde3D/Source/Horde3DEngine/egCom.h (revision 46)
+++ Horde3D/Source/Horde3DEngine/egCom.h (working copy)
@@ -27,6 +27,7 @@
#include "egPrerequisites.h"
#include <time.h>
+#include <stdarg.h>
#include <cstdlib>
#include <cstring>
#include <string>
I don't know whether the cmake changes might break other compilers, but it should work that way with both MinGW and MSVC.