Compile all C files with your usual options plus -fPIC. This produces
position-independent code needed by shared object files.
Link the resulting .o files with a command like
gcc *.o -shared -o file.so [-l<libraries>]
全站熱搜
Compile all C files with your usual options plus -fPIC. This produces
position-independent code needed by shared object files.
Link the resulting .o files with a command like
gcc *.o -shared -o file.so [-l<libraries>]