[pacman-dev] Arguments for alpm_initialize
Zameer Manji
zmanji at gmail.com
Thu Mar 1 02:10:26 EST 2012
Hello,
This is my first time posting on this list, so my apologies if this is
the incorrect place to ask for help. I've been trying to create a
wrapper around libalpm for my own uses and I'm trying to get the
project off the ground with a simple program:
#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;
}
Currently the program outputs "No Handle" and "No Error Code Given".
What can I do inorder to either get the handle correctly or get an
error code so I can investigate further?
--
- Zameer Manji
More information about the pacman-dev
mailing list