https://d.puremagic.com/issues/show_bug.cgi?id=12443
--- Comment #2 from Andrej Mitrovic <[email protected]> 2014-03-23 03:24:26 PDT --- (In reply to comment #1) > For the record, Delphi does away with import libraries completely and solves > the DLL problem in the language. E.g.: > > function MessageBoxA(hWnd: HWND; lpText, lpCaption: PChar; uType: UINT): > Integer; stdcall; external 'user32.dll'; > > So in theory D could have an extern(dll, "user32.dll") attribute. It would be a little complicated with platform-independent shared libraries. For example: ----- version (Windows) extern(dll, "user32.dll") extern(C) void foo(); void main() { foo(); // would fail on Posix since the entire block becomes invisible } ----- We currently cannot do the following: ----- version (Windows) extern(C++): else extern(C): void foo(); void main() { } ----- Unless this is fixed extern(dll, "user32.dll") would only be usable for Windows DLLs, or you'd likely have to duplicate code / resort to string mixins and other unreadable hacks.. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
