Skip to content

Instantly share code, notes, and snippets.

@zmanji
Created March 1, 2012 06:55
Show Gist options
  • Save zmanji/1947905 to your computer and use it in GitHub Desktop.
Save zmanji/1947905 to your computer and use it in GitHub Desktop.
Trying to get libalpm to work
#include <alpm.h>
#include <stdio.h>
int main(void)
{
enum _alpm_errno_t errno = 0;
alpm_handle_t* t = alpm_initialize("/", "/var/lib/pacman", &errno);
if(t == NULL)
{
printf("Got APLM handle");
}
else
{
printf("No Handle");
if(errno == 0)
{
printf("No Error Code Given");
}
}
alpm_release(t);
return 0;
}
@zmanji
Copy link
Author

zmanji commented Mar 1, 2012

Compile with "clang main.c -lalpm"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment