Link errors when compiling shared lib on windows
Jerry
hurricane at hereiam.com
Wed Nov 1 23:46:50 UTC 2017
On Wednesday, 1 November 2017 at 16:02:37 UTC, Daniel Fitzpatrick
wrote:
> On Wednesday, 1 November 2017 at 15:52:17 UTC, kinke wrote:
>> On Wednesday, 1 November 2017 at 15:15:27 UTC, Daniel
>> Fitzpatrick wrote:
>>> I am following this short tutorial on compiling a shared lib:
>>>
>>> https://wiki.dlang.org/Call_D_from_Ruby_using_FFI
>>>
>>> Because it's on Windows I am using these compiler options:
>>>
>>> -shared -m64 -defaultlib=libphobos2.so i.d
>>>
>>>
>>> However, I am receiving rather a lot of linker errors. Not
>>> sure what else to provide the compiler.
>>
>> Try less, especially no `-defaultlib` overridden with a Linux
>> shared-object. You'll have to edit the hardcoded `./i.so` in
>> the example as well obviously.
>
> Oops, missed that! What i've tried is
>
> -shared -m64 i.d
> -shared -m64 -defaultlib=libphobos2.dll i.d
>
> Still seeing a lot of linker errors. Errors for the former:
There's no shared library of Phobos for Windows with either DMD
or LDC. You have to statically link to it.
More information about the Digitalmars-d
mailing list