Library Linking in GCC
Ok, I know I am missing something truly elemental but I need help. First off, let me apologize for my inexperience. I am just starting use of Linux and gcc and know enough to be dangerous.
That being said, I've created a shared object library from a series of c source files in gcc. I now have a libraray libName.so in my working directory. To make sure this library works I have a test program (testprog.c) that calls the library. When I compile that file using: gcc -o testprog.c -l Name, I get the error /usr/bin/ld: cannot find -lName. I cannot seem to copy the library to any of the library directories (get an error in Unbutu that says I can't) so I would like to have the compiler pick up the library from my working directory. How do I do that? Is there anything else I am missing or any mistakes that could be causing this?
Thanks for your help!
|