I'm trying to link to WordNet library. I downloaded the header file (wn.h), libWN.a file and a bunch of .o files (libWN_a-search.o, etc) from WordNet. I put a main.c, wn.h and libWN.a files in a folder and implemented main.c:
#include <stdio.h>
#include "wn.h"
int main(int argc, char *argv[]) {
char rc, *s;
s = "cat";
rc = in_wn(s, ALL_POS);
printf("rc: %d\n", rc);
return 0;
}
I try to compile using cc main.c -L. but I get the linker error:
/usr/bin/ld: /tmp/ccvzqY4x.o: in function `main':
main.c:(.text+0x27): undefined reference to `in_wn'
collect2: error: ld returned 1 exit status
Documentation on WordNet lib can be found here. I'm just not sure what I'm doing wrong.