June 18, 2012 Re: Why is libphobos not a shared library? | ||||
---|---|---|---|---|
| ||||
Posted in reply to 拖狗散步 | On Monday, 18 June 2012 at 00:59:02 UTC, 拖狗散步 wrote:
> dmd -shared testlib.d
>
> error:
>
> relocation R_X86_64_32 against '.data' can not be used when making a shared object; recompile with -fPIC
>
> could not read symbols:bad value
>
> so gdc error。。。
>
> my system is ubuntu 64b
Brothers help me!
|
June 26, 2012 Re: Why is libphobos not a shared library? | ||||
---|---|---|---|---|
| ||||
Posted in reply to 拖狗散步 | On Monday, 18 June 2012 at 01:00:26 UTC, 拖狗散步 wrote:
> On Monday, 18 June 2012 at 00:59:02 UTC, 拖狗散步 wrote:
>> dmd -shared testlib.d
>>
>> error:
>>
>> relocation R_X86_64_32 against '.data' can not be used when making a shared object; recompile with -fPIC
>>
>> could not read symbols:bad value
>>
>> so gdc error。。。
>>
>> my system is ubuntu 64b
>
> Brothers help me!
I'd been having problems with shared libs and DMD on 64-bit Ubuntu but:
dmd -shared -fPIC -defaultlib= testlib.d
seemed to work for me (the -defaultlib= stops dmd trying to link libphobos into the library which gives another relocation error).
|
Copyright © 1999-2021 by the D Language Foundation