D bindings for Shapefile C Library

Sönke Ludwig sludwig+dforum at outerproduct.org
Wed Jan 29 02:53:50 PST 2014


Am 29.01.2014 05:24, schrieb Craig Dillabaugh:
> I've created bindings for the C Shapefile Library.  Shapefiles
> are a format used commonly in vector based Geographic Information
> Systems, often for data interchange. It is a pretty simple
> library and it is my first effort at creating such bindings.
>
> https://github.com/craig-dillabaugh/shplib.d
>
> I've looked in Demios and code.dlang.org to see what the standard
> setup for such bindings is, and while most are similar there
> doesn't seem to be an accepted layout.  If anyone has a moment to
> spare I would be happy if someone could have a look to see if
> there are any obvious improvements that should be made.
>
> I plan to run a few more tests on my bindings, and once those all
> work, I hope to add this to code.dlang.org.

There are only two possible improvements that I can see:

  - The "C" folder may be better off in the root folder of the project,
    because it doesn't fit with the D sources from a build process point
    of view. In practice it doesn't really hurt either, so your mileage
    may vary.

  - Usually I try to include .lib files for the library bindings on
    Windows, since it greatly simplifies the setup process, which is
    usually trivial on Linux.

Other than that I'd recommend to use a version scheme for the git 
tags/branches that matches the version scheme of the C library (probably 
excluding the patch version, which should be reserved for the binding 
itself). Unfortunately the Deimos bindings use neither branches, nor 
version tags.


More information about the Digitalmars-d-announce mailing list