I created 9 static libs (x1.a x2.a x3.a....x9.a) and 9 shared libs (y1.so, y2.so,....y9.so) when linking with static libs everything looks ok, but when linking with shared libs, it is not working), for final linking I am using -static when linking with static libs, where as I am not using any flag when linking with shared libs, do I have to use any other flag with shared libs?.
1) this command to create final exe file using static libs
gcc -static -Wall -g -O2 xyz1.o xyz2.o xyz3.o -L/opt/lib -lx1 -lx2 -lx3 ... -lx9 -ldl -lpthread -lm -lstdc++ -o final-exe-file
2) this command to create final exe file using shared libs
gcc -Wall -g -O2 xyz1.o xyz2.o xyz3.o -L/opt/lib -ly1 -ly2 -ly3.... -ly9 -ldl -lpthread -lm -lstdc++ -o final-exe-file
|