c++ - /usr/bin/ld: cannot find -


I have created a .so file and put it in place / opt / Lib and after this code was added to LD_LIBRARY_PATH when I try to compile my main program with the following command:

  G + + -Wall-I / home / Alvin / Development / Calculator / Main CPP -lcalc -o calculator   

I get the following error:

  / Usr / bin / ld: can not find -lcalc collect2: ld 1 out Take position   

Can anyone help me with this? This is the first time that I am trying to create a shared library.

Add -l / opt / lib / Code> For its compiler parameter, it creates a compiler and linker search path for libcal.so in that folder.

Comments