Windows static linking question

frame frame86 at live.com
Tue Apr 27 07:41:28 UTC 2021


On Tuesday, 27 April 2021 at 07:13:16 UTC, Imperatorn wrote:
> On Tuesday, 27 April 2021 at 06:29:40 UTC, frame wrote:
>> From my source...
>>
>> ```d
>> // main.d
>> pragma(lib, common.lib);
>> extern (C) void fun(bool something);
>> ```
>>
>> [...]
>
> Did you mean to use rdmd and not dmd? 🤔

I could not get it working using dmd. It gaves me LNK2001 linker 
errors. I honestly have no idea what rdmd else applies to the 
linker (should inspect it with sysinternals).

But this should not have any impact on the LIB-file. I build the 
EXE also with rdmd and if the LIB-file contains the link to the 
DLL everything is fine.


More information about the Digitalmars-d-learn mailing list