BZ2 library

Basile B. via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Mar 11 22:16:49 PST 2016


On Saturday, 12 March 2016 at 05:16:37 UTC, stunaep wrote:
> I'm really having a hard time using bzp (and later I need gzip 
> and lzma).
>
> So I added this bzip2 D interface to my DUB dependencies
>     "dependencies" : {
>         "bzip2": "~>0.1.0"
>     }
>
> I downloaded the bzip2 source code and compiled it for windows 
> 32bit (will 64 bit work with dmd2?). Then I used coffimplib.exe 
> to convert the .lib file from coff to omf. From there I added 
> this code:
>     pragma(lib, "libbzip2OMF.lib");

You can try to compile the bzip2 sources with dmc 
(http://www.digitalmars.com/download/dmcpp.html) instead of using 
coffimplib, this will produce directly a static library in OMF 
format.

As for the pragma you can remove it and add this to your JSON:

"dflags": ["bin\bz2.lib"],

for example if the lib is located in the "bin" subfolder and 
named "bz2.lib"


More information about the Digitalmars-d-learn mailing list