DMD Refuses to Compile Multiple Source Files

Stefan Koch via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jan 17 19:25:47 PST 2017


On Wednesday, 18 January 2017 at 03:11:08 UTC, Samwise wrote:
> On Wednesday, 18 January 2017 at 02:48:45 UTC, James Buren 
> wrote:
>> Import the source file containing the external function 
>> instead of writing that prototype. It should compile then.
>
> This seems like a workaround more than a permanent solution. It 
> would work, but still. I'm also not sure about the syntax for 
> that (Given that getReturnCode.d is in the same directory as 
> hello.d).
> ~Sam
In extern (D) functions (which is the default)
The module name is part of the mangled name.
What you are trying to do would work ,
if the getReturnType would be extern(C).


More information about the Digitalmars-d-learn mailing list