[Issue 20012] New: export inside mixin doesn't seem to work
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jun 30 04:31:19 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=20012
Issue ID: 20012
Summary: export inside mixin doesn't seem to work
Product: D
Version: D2
Hardware: All
OS: Windows
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: turkeyman at gmail.com
This works:
export extern(C) void fun() {}
Build as a DLL, fun is correctly exported. You can get "fun" with
GetProcAddress.
This doesn't work:
mixin template M()
{
export extern(C) void fun() {}
}
mixin M!();
When I do this, "fun" is just not exported and GetProcAddress fails.
What's very strange is, the library feature SimpleDllMain in
core.sys.windows.dll to mixin the DllMain function DOES seem to work, and
looking at the source, it's not even declared `export`... so maybe there's just
some special handling for the DllMain symbol?
--
More information about the Digitalmars-d-bugs
mailing list