Derelict Tango Fixes
Thanks to a patch from larsivi, Derelict's build script now works 100% with Tango. There are a few caveats, though. You can't execute it as a script and will have to compile it first. Compiling it with Bud fails (at least on Windows) so you'll need to do so with Rebuild. Also, the script currently uses Bud internally, meaning you'll still need Bud on your path in order to execute it. I'll be adding internal support for Rebuild in the near future to remedy that part at least, so that you'll have the option to configure one or the other. All of the details are in the documentation.
Please keep in mind that the recommended way to use Derelict is to compile your applications with Bud or Rebuild and allow them to automatically compile and link the modules you use. You only need to run the build script to generate the Derelict libraries if you are using Code::Blocks or another IDE or build system that uses a two-step compile/link process.
Technorati Tags: D Programming Language, Bud, Rebuild, Derelict, Tango
Derelict Problems with DMD 1.018
DerelictAL/GL/GLU/IL/ILU/ILUT all have one thing in common: the functions they bind to on the C side have the __stdcall calling convention on Windows and the regular C calling convention on other platforms. As a result, the function pointers in D need to be declared as extern(Windows) on Windows and extern(C) on other platforms.
In order to avoid duplicating the function pointer declarations, they were implemented this way:
version(Windows)
extern(Windows):
else
extern(C):
// function declarations go here
In DMD 1.018, Walter fixed a long standing DMD bug that had to do with version statements. The fix broke the above code, causing the affected Derelict modules to fail compilation. The Derelict fix seemed simple:
version(Windows)
{
extern(Windows):
}
else
{
extern(C):
}
// function declarations go here
Version statements do not create a new scope, so the effect should have been the same as the original code. As expected, it compiles fine. However, the problem manifests itself in a different form: the extern statements are having no effect on the function declarations. As a result, the compiled executables are crashing on both Windows and Linux.
I tested to be sure the version statements are working as expected and not creating a new scope. So now it seems quite obvious (based on the original bug report) that the problem has to do with the colon following the extern statements.
The way I can see to work around the problem is to add the appropriate extern statement to each function pointer declaration, meaning two of each. That's not going to happen. So I'm filing a bug report and hoping it gets fixed in the very near future.
Meanwhile, if you are using one of the affected packages, you'll need to stick with DMD 1.017 or earlier. Again, this is only for the packages listed above. The other packages, such as the DerelictSDL* stuff, are not affected.
Technorati Tags: D Programming Language, DMD, Derelict
Derelict Updated for DMD 1.018
All Derelict modules are now once again compilable with DMD 1.018.
Technorati Tags: D Programming Language, DMD, Derelict
DMD 1.018 and 2.002
Walter has released new versions of DMD 1.0 (1.018) and the 2.0 alpha series (2.002). Both contain a massive number of bug fixes. There's also a name change for the phobos library on Linux in 2.002, from libphobos.a to libphobos2.a. A gentle reminder: the 2.0 series is alpha and is not yet intended for production code.
If you are a Derelict user, you'll likely want to hold off a few hours before upgrading to 1.018. One of the bug fixes causes compilation of some Derelict modules to fail. I'll get a fix up for this within the next couple of hours and will post both here and in the Derelict forums when I've done so.
Technorati Tags: D Programming Language, DMD, Digital Mars, Walter Bright, Derelict