Skip to content

Instantly share code, notes, and snippets.

@aaronjgreenberg
Last active December 21, 2015 08:19
Show Gist options
  • Save aaronjgreenberg/6277340 to your computer and use it in GitHub Desktop.
Save aaronjgreenberg/6277340 to your computer and use it in GitHub Desktop.
How to link libgit2, so I remember for later.

Assuming you've successfully built libgit2...

$ ls -l
drwxr-xr-x ... libgit2
-rw-r--r-- ... test.c
$
$ gcc -I ./libgit2/include -L ./libgit2/build -l git2 -o test test.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment