Any interest in libgit bindings?

Craig Dillabaugh cdillaba at
Wed Oct 10 18:47:20 PDT 2012

On Thursday, 11 October 2012 at 01:39:46 UTC, Andrej Mitrovic
> On 10/10/12, Jacob Carlborg <doob at> wrote:
>> I would absolutely have interest in this.
> Well it's mostly done (can't tell if anything is missing, 
> except the
> docs). I had to reimplement inline functions in D since they're 
> not
> exported on the C side (maybe -fkeep-inline-functions could 
> work on
> Posix but it doesn't on Windows). I don't know of a 
> non-intrusive way
> to work around this so I copy-pasted the functions to D and 
> made them
> compilable.
> I'll put an extern(C) at the top later to replace all the 
> extern(C)
> declarations, but that's just a styling issue that's easily 
> fixed.
> But I can't get it to link with libgit on Linux though. After
> compiling and installing libgit (which copied the shared lib to
> /usr/local/lib), I've tried:
> $ cd samples/diff
> $ rdmd --force -L-L/usr/local/lib -L-lgit2 -I../../src diff.d
> /tmp/.rdmd-1000/rdmd-diff.d-572543621CF312EC72273F3DB4C6B8BE/diff:
> error while loading shared libraries: cannot open 
> shared
> object file: No such file or directory
> I never have luck with Posix. :)
> This is from branch 'development', commit
> acd1700630ea1159a55dc5e8cee12e4a725afe18 from
> Instructions on building libgit2 are here: 

Likely you have already tried this but just in case not ...

For Linux is /usr/local/lib in your  /etc/ file?
If not, add it and run ldconfig.


More information about the Digitalmars-d mailing list