Dub package with C code
Rikki Cattermole via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Sep 23 21:17:08 PDT 2015
On 24/09/15 2:43 PM, Sebastiaan Koppe wrote:
> I have just created bindings for libxlsxwriter, an c library for
> creating excel files.
>
> Used the htod tool to do most of the work, and only had to adjust some
> things - mainly because libxlsxwriter uses data structures written in
> macro's.
>
> Right now I am making a dub package and I would like to aim for
> convenience for end-users (read: me).
>
> Therefor I decided to include the compiled static library inside the
> package. I only use Linux 64-bit myself, but this is obviously limiting
> for other people.
>
> The other option I had was to include the whole c code, depend on gcc or
> clang, and have dub (somehow) first build libxlsxwriter. But that
> seemed a bit too much...
>
> Another option would be to require end-users to build libxlsxwriter
> themselves.
>
> What do you guys recommend?
Is libxlsxwriter available in the systems package manager?
If so, I would just link against that. Preferably the shared library.
Let e.g. Windows users figure theirs out.
More information about the Digitalmars-d-learn
mailing list