/usr/bin/ld: cannot find
When you make the call to gcc it should say
g++ -Wall -I/home/alwin/Development/Calculator/ -L/opt/lib main.cpp -lcalc -o calculator
not -libcalc.so
I have a similar problem with auto-generated makes.
You can create a soft link from your compile directory to the library directory. Then the library becomes "local".
cd /compile/directory
ln -s /path/to/libcalc.so libcalc.so
@Alwin Doss You should provide the -L option before -l. You would have done the other way round probably. Try this :)
You need to add -L/opt/lib
to tell ld
to look there for shared objects.
Add -L/opt/lib
to your compiler parameters, this makes the compiler and linker search that path for libcalc.so
in that folder.