On 11/12/2013 2:23 PM, Martin Nowak wrote:
On Monday, 11 November 2013 at 04:18:09 UTC, Walter Bright wrote:
The compiler would benefit from knowing which modules are from a shared
library, and it needs to anyway in order to distinguish between dllimport and
dllexport.
We didn't found any reasonably simple solution to pass this information to the
compiler. You'd have to explicitly list ALL modules that are supposed to be
linked into the same DLL when compiling an object file.
One possibility is modules listed on the command line are regarded as
export==dllexport, and other modules as export==dllimport.
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.