Hi everybody. I have a doubt in one of the command which is shown below.
1. I created my own adding and multiplication funtion definitions saved in two separate files named "sum.c" and "mul.c". The function calls are present in "main.c" ofcourse.
2. I got the assembler output files by
cc -c sum.c & cc -c mul.c
3. I created my own dynamic library using the "sum.o" & "mul.o" object files by
ar rcs libDynamic.so sum.o mul.o
4. I know to use the created library to generate the "a.out" file by the command
cc main.o ./libDynamic.so
I want to know what does this below command do and why it is needed?
cc -shared -o libDynamic.so sum.o mul.o
Also, to copy this libDyamic.so into standard library folder so that i can use shortcut for this library eg: cc main.o -lDynamic, what shoud i do??
All views are accepted. thank you in advance :)