GCC -l option is to link the library. It can use for static and share link. Link -l with library name without the lib prefix and the .a or .so extensions.
Static : gcc -static -ltest xx.c, it will link with libtest.a
share : gcc –ltest xx.c it will link with libtest.so
原文地址:https://www.cnblogs.com/zjbfvfv/p/10184130.html
时间: 2024-10-30 10:38:09