On 11/14/2013 5:31 AM, Benjamin Thaut wrote:
Am 14.11.2013 11:28, schrieb Walter Bright:

This of course means that functions may wind up going through the
dllimport indirection even for calling functions in the same dll, but it
should work.

Also our suggested approach would not have this downside.

Think about phobos. All of phobos and druntime will be littered with export
attributes. Do you really want all phobos and druntime from within the same dll
to go through dll indirections? And what would happen when building phobos as
static library? With your suggested behavior (export=dllimport if not specified
otherwise) this would mean that even the phobos static library would have those
indirections.


It's not that bad. Phobos can be built by specifying all the files on the command line.

Also, at least on Windows, you can call functions in a DLL without saying dllimport on them and suffering a layer of indirection. The magic happens in the import library, which provides the relevant thunk. It's about 15 years since I worked on this stuff, so I might be a bit fuzzy on the details.

Reply via email to