I have a library I created called BlackBoxUtilities.so and when I go to link it against a executable I'm trying to compile, the linker can't find it. Here's what I've tried.
The project directory is /usr/home/nahnig/BlackBox.
When I run that it says
So I tried...
Then I copied the shared library to /usr/local/lib and tried
So I copied the library to /usr/lib thinking that's where ld() looks first. And tried
Nothing works so I change directory to /usr/lib and
So what am I doing wrong here?
The project directory is /usr/home/nahnig/BlackBox.
cc -I/usr/local/include -L/usr/home/nahnig/BlackBox -lBlackBoxUtilities.so fuzzer.cWhen I run that it says
Code:
/usr/bin/ld: cannot find -lBlackBoxUtilities.so
cc: error: linker command failed with exit code 1 (use -v to see invocation)
So I tried...
cc -I/usr/local/include -L/usr/home/nahnig/BlackBox -lBlackBoxUtilities fuzzer.c cc -I/usr/local/include -L/usr/home/nahnig/BlackBox -o fuzzer fuzzer.c -lBlackBoxUtilitiesThen I copied the shared library to /usr/local/lib and tried
cc -I/usr/local/include -L/usr/local/lib -o fuzzer fuzzer.c -lBlackBoxUtilities.So I copied the library to /usr/lib thinking that's where ld() looks first. And tried
cc -I/usr/local/include -L/usr/lib -o fuzzer fuzzer.c -lBlackBoxUtilitiesNothing works so I change directory to /usr/lib and
cc -I/usr/local/include -lBlackBoxUtilities fuzzer. worked if I copied in the fuzzer executable.So what am I doing wrong here?