compile shared lib with dub

dom via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jun 25 16:38:55 PDT 2015


i want to build a shared library (.so) with dub. currently i 
compile with a shell script, but i'd like to use dub

[code]
dmd -c test.d -fPIC
dmd -ofcod4xalicebridge.so test.o -shared -g -w -debug 
-version=Have_cod4xalicebridge
[/code]

could anyone tell me how my dub.json has to look like?

my >failing< dub.json :/
[code]
{
         "name": "cod4xalicebridge",
         "description": "A minimal D application.",
         "copyright": "Copyright © 2015, root",
         "authors": ["root"],
         "targetType": "dynamicLibrary",
         "dflags": ["-fPIC", "-shared"],
         "dependencies": {
         }
}
[/code]


More information about the Digitalmars-d-learn mailing list