strange -fPIC compilation error

bachmeier via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Nov 1 10:34:14 PDT 2016


On Tuesday, 1 November 2016 at 17:23:54 UTC, Charles Hixson wrote:
> On 11/01/2016 12:52 AM, Nordlöw via Digitalmars-d-learn wrote:
>> On Tuesday, 1 November 2016 at 07:15:19 UTC, Mike Parker wrote:
>>>> but
>>>> dmd -defaultlib=libphobos2.so -fPIC test.d
>>>> works.  It shouldn't be required (as in the default 
>>>> /etc/dmd.conf should handle it correctly, but I can deal 
>>>> with it now.
>>
>> Can this be fed as parameters to the DMD call 
>> (programmatically) instead of manual editing of dmd.conf?
>>
> I did feed it into the dmd call programmatically.  Thus:
>  dmd -defaultlib=libphobos2.so -fPIC test.d
>
> I'm reluctant to edit the dmd.conf file as I don't really 
> understand the syntax...and I have to be root to do the editing.

https://dlang.org/dmd-linux.html#dmd-conf

You can copy dmd.conf to the current working directory and try 
out changes there. That will only affect the current program. 
Then you can move it to your home directory.


More information about the Digitalmars-d-learn mailing list