I don't understand why this doesn't compile
I just don't get it, I included md5.h and sys/types.h, why i see this ^^^
Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <md5.h>
int main(int argc, char **argv) {
MD5_CTX md5;
MD5Init(&md5);
char test[]="test";
MD5Update(&md5, test, strlen(test));
char *res = MD5End(&md5, NULL);
printf("%s\n", res);
free(res);
return 0;
}
Code:
killasmurf86 $ make
cc -O2 -pipe -march=pentiumpro -Wall -std=c99 -g passwd.c -o test
/var/tmp//ccKahwVY.o(.text+0x23): In function `main':
/home/killasmurf86/src/c/sd_prog/src/passwd.c:12: undefined reference to `MD5Init'
/var/tmp//ccKahwVY.o(.text+0x4d):/home/killasmurf86/src/c/sd_prog/src/passwd.c:15: undefined reference to `MD5Update'
/var/tmp//ccKahwVY.o(.text+0x5b):/home/killasmurf86/src/c/sd_prog/src/passwd.c:17: undefined reference to `MD5End'
*** Error code 1
Stop in /home/killasmurf86/src/c/sd_prog/src.