hi there,

i try to write a program ( see below ) to provide a command line tool for
checking a userīs pwd with vpopmails function vauth_user. I am a C noob so i
am confused why vauth_user raise an "undefinde reference" error when i
include vpopmail.h - Do i have to use another vpopmail function for this ?

many thanks for an answer

Ferdinand Hackl


gcc vauth.c -o vauth
/tmp/cckIJsgT.o(.text+0x6d): In function `main':
: undefined reference to `vauth_user'
collect2: ld returned 1 exit status

-------- vauth.c-----------

#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include </home/vpopmail/include/vpopmail.h>
#include </home/vpopmail/include/vauth.h>


#define MAX_BUFF 80

static struct vqpasswd *pw;

int main()
{

   char Username[MAX_BUFF];
   char Domain[MAX_BUFF];
   char Password[MAX_BUFF];

   strcpy (Username, "test");
   strcpy (Domain , "foo.bar");
   strcpy (Password , "test");
   pw = vauth_user( Username, Domain, Password, "" );
   return 0;
}

Reply via email to