I've built and installed mini-xml already on my computer, but when I try to compile their test program with gcc testmxml.c -lmxml -o myprogram
, the error ld: library not found for -lmxml
Any solutions to this problem?
I've built and installed mini-xml already on my computer, but when I try to compile their test program with gcc testmxml.c -lmxml -o myprogram
, the error ld: library not found for -lmxml
Any solutions to this problem?
Use the compiler option -L<directory-with-lib-file>
to point to the directory (<directory-with-lib-file>
) to where you build the libmxml.so
, libmxml.a
file(s).
Place this option on gcc's command line before the -lmxml
option.
Example:
-L/the/path/to/the/library/ -lmxml
More details on how to steer gcc's linker may be read here: https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html