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>]
留言列表