I\'m having a problem with my compiler telling me there is an \'undefined reference to\' a function I want to use in a library. Let me share some info on the problem:
I guess you have to add the path where the linker can find the libraray. In gcc/ld you can do this with -L and libraray with -l.
-Ldir, --library-path=dir
Search directory dir before standard search directories (this option must precede the -l option that searches that directory).
-larch, --library=archive
Include the archive file arch in the list of files to link.
Response to answers - there is no .a library file, just .h and .c in the library, so -l isn't approriate
Then you may have to create the libraray first?
gcc -c mylib.c -o mylib.o
ar rcs libmylib.a mylib.o