差異處
這裏顯示兩個版本的差異處。
Both sides previous revision 前次修改 下次修改 | 前次修改 | ||
gcc [2017/11/12 18:23] jz |
gcc [2017/11/12 23:02] (目前版本) jz |
||
---|---|---|---|
行 8: | 行 8: | ||
# shared | # shared | ||
g++ -shared -fPIC -o libmylib.so mylib1.o mylib2.o | g++ -shared -fPIC -o libmylib.so mylib1.o mylib2.o | ||
- | g++ -o main main.cpp -L. lmylib | + | g++ -o main main.cpp libmylib.so |
LD_LIBRARY_PATH=. ./main | LD_LIBRARY_PATH=. ./main | ||
行 41: | 行 41: | ||
[[https://www.linaro.org/downloads/]] | [[https://www.linaro.org/downloads/]] | ||
+ | |||
+ | |||
+ | **Ref** | ||
+ | * http://codingstandards.iteye.com/blog/1142358 | ||
+ | * https://www.ptt.cc/bbs/LinuxDev/M.1162669989.A.2E6.html |