How to setup mono-D for shared libraries?

Jacob via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Sep 24 14:58:30 PDT 2015


On Wednesday, 23 September 2015 at 04:34:45 UTC, Rikki Cattermole 
wrote:
> On 23/09/15 8:20 AM, Jacob wrote:
>> How do I setup mono-D for creating shared libraries and 
>> including them
>> into other projects? When I drag the .d files to create the 
>> library
>> from, which is not my own, I get undefined references. I have 
>> the lib
>> files, which are a bunch of separate libs, that I want to 
>> include into
>> one big lib. Once that's done I want to include that lib into 
>> another
>> project.
>>
>> I'd rather not modify si.ini. Are there any tutorials for 
>> getting
>> started with Mono-D? (setup, not coding)
>
> Well you could go the route of dub, which configuration files 
> can be loaded directly into it as a project.

To create the library, what do I do?

'dub init myLib'

then delete app.d,

and then add all the library.d files?

Then what? Where do I tell it to find the .lib files without 
adding them to sc.ini?

Do I just mess with dub.json to and add all the proper build 
options to get both the lib and the dependent apps working or are 
there other steps I'm missing?







More information about the Digitalmars-d-learn mailing list