On 12/11/10 8:30 PM, Jonathan M Davis wrote:
You don't need that compatability with dlls? _That_ I did not know. That would help a _lot_ in my case then, because most of our projects are shared libraries. It doesn't entirely solve the problem, but in this case, it's enough that it may make it feasible to actually do some stuff in D.
Yes, you don't need object file compatibility if you don't link in the DLL via an implib, but instead look up the symbols dynamically (e.g. via LoadLibrary/GetProcAddress on Windows).
If I remember correctly, there are some tools for generating OMF implibs as well, but they have never worked for me…
By the way, this reminds me that we desperately need solid cross-platform dynamic library support in Phobos – std.loader is undocumented, does not conform to the Phobos coding style, and exposes a very strange API (ExeModule is a scope class? WTF?). In SWIG, for example, I use a homegrown solution based on the loading code from Derelict2, but I'd very much prefer having this in Phobos.
This will probably get even more important if shared library support will eventually be added to DMD (When was this scheduled to happen again? After 64bit support and fixing the const system?).
David
