SCons and D

bachmeier via Digitalmars-d digitalmars-d at puremagic.com
Fri Jun 9 11:51:35 PDT 2017


On Friday, 9 June 2017 at 07:52:59 UTC, Russel Winder wrote:
> On Thu, 2017-06-08 at 22:03 +0000, bachmeier via Digitalmars-d 
> wrote:
>> On Thursday, 8 June 2017 at 14:27:53 UTC, Russel Winder wrote:
>> > It seems I am on a bit of a roll getting changesets relating 
>> > to D support for SCons into an appropriate state so that 
>> > they get merged into the mainline SCons repository. So maybe 
>> > now is a time to get any "pet peeves" with D support in 
>> > SCons fixed.
>> 
>> When I create a shared library I get an error message.
>> 
>> SharedLibrary('lib2', ['lib2.d'])
>> 
>> leads to
>> 
>> dmd -oflib2.so -shared -defaultlib=libphobos2.so
>> -L-soname=lib2.so lib2.os
>> Error: unrecognized file extension os
>> 
>> Apparently using the .os extension works for C but not with 
>> dmd.
>
> Hummm… there is a passing test for creating shared objects, the 
> test must be wrong in some way.
>
> Can you email me a small project that exhibits the problem for 
> you, and I will add it to the test suite.

I sent you an email with my code. The solution I found was to use

SharedLibrary('lib2', ['lib2.d'], SHOBJSUFFIX='.o')

instead of the above SharedLibrary call (which I took from the 
documentation).


More information about the Digitalmars-d mailing list