Tech Journal Back to Tech Journal

When linking in a library, I get a "not found" error, why?

I did -lmylibname and it said "not found". It's right there in the directory, what's wrong?

Make sure you name the lib file libmylibname.a - this is if it's a static library. Pay attention that the library name must be prefixed with lib, and postfixed with .a.

If it's a dynamic library, it should be named and/or ma sure the LD_LIBRARY_PATH variable includes the directory to the shared library. Use ldd mylibname to make sure the system can find it.

Last updated on 2007-07-03 09:03:02 -0700, by Shalom Craimer

Back to Tech Journal