When I execute this command
g++ -L/home/andrea/Desktop/cppTest/Test1/myLib -I/home/andrea/Desktop/cppTest/Test1/commons -lNames compiledObjects/SayHello.o -o SayHello
The compiler return this error:
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lNames
collect2: error: ld returned 1 exit status
Why the compiler search "Names" here
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld
instead of
/home/andrea/Desktop/cppTest/Test1/myLib
That is the path specified using -L argmunt?
Problem found
The real problem was that I've forgotten to name the library in this way libName.so