Created
March 1, 2012 06:55
-
-
Save zmanji/1947905 to your computer and use it in GitHub Desktop.
Trying to get libalpm to work
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Compile with "clang main.c -lalpm"