Hi,
I've updated / rewritten the D bindings for Horde3D 1.0.0 Beta1. You can download them under
https://server1.noeding.net/d/horde3d-D_1.0.0_Beta1.zipIn the zip archive are:
- Derelict bindings for Horde3D
- converter script which "parses" the C++ bindings to generate the D files
- Derelict bindings for GLFW, from http://odefu.blogspot.com/2008/04/glfw-derelictified.html
- Knight sample directly ported to D (uses Tango, but Phobos support should be trivial); compile with version=Tango
I have tested it under Linux (64bit) using rebuild and gdc. I hope that it just works under Windows.
For Linux you have to make three small changes to Horde3D:
Code:
--- Source/Shared/utPlatform.h.old 2008-04-14 17:13:25.000000000 +0200
+++ Source/Shared/utPlatform.h 2008-04-14 17:12:29.000000000 +0200
@@ -43,7 +43,7 @@
# ifdef PLATFORM_WIN
# define DLLEXP extern "C" __declspec( dllexport )
# else
-# define DLLEXP
+# define DLLEXP extern "C"
# endif
#endif
Code:
--- Bindings/C++/Horde3D.h.old 2008-04-14 17:15:39.000000000 +0200
+++ Bindings/C++/Horde3D.h 2008-04-14 01:16:58.000000000 +0200
@@ -30,7 +30,7 @@
# if defined( WIN32 ) || defined( _WINDOWS )
# define DLL extern "C" __declspec( dllimport )
# else
-# define DLL
+# define DLL extern "C"
# endif
#endif
Code:
--- Bindings/C++/Horde3DUtils.h.old 2008-04-14 17:15:44.000000000 +0200
+++ Bindings/C++/Horde3DUtils.h 2008-04-14 17:15:17.000000000 +0200
@@ -32,7 +32,7 @@
# if defined( WIN32 ) || defined( _WINDOWS )
# define DLL extern "C" __declspec( dllimport )
# else
-# define DLL
+# define DLL extern "C"
# endif
#endif
These patches just enable extern "C" linking under Linux.