Windows static linking question
Mike Parker
aldacron at gmail.com
Tue Apr 27 08:50:37 UTC 2021
On Tuesday, 27 April 2021 at 08:33:23 UTC, frame wrote:
> On Tuesday, 27 April 2021 at 07:55:53 UTC, Mike Parker wrote:
>> On Tuesday, 27 April 2021 at 07:41:28 UTC, frame wrote:
>>>
>>>> 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).
>>>
>>
>> What is your dmd command line?
>
> not very different:
>
> ```
> dmd -L/DLL -L/OUT:common.dll -m64 -of=common.dll -I=sources
> common.d
> ```
What specifically are the linker errors? Is it referring to
`_DLLMainCRTStartup` or something else?
Also, I suspect the reason you're getting the renaming errors
with rdmd is because you're passing both `-L/OUT:common.dll` and
`-of=common.dll`. You should only need one of them (same goes for
dmd). But I don't think rdmd is intended to actually compile a
distributable binary. You should try to get this working with dmd
to solve your linker errors.
More information about the Digitalmars-d-learn
mailing list