Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我目前在编译以下行时遇到问题:
gcc test.c -I/usr/include -L/lib -lipc -lpcd -lrt -o /home/examples/bin/test
有人建议我使用 start-group 和 end-group 对它们进行分组。
我无法获得正确的语法。
我想我需要这部分,但整条线是什么样子的?
-Wl,--start-group -lipc -lpcd -lrt -Wl,--end-group
你有哪个问题?
无论如何,尝试将链接器参数放在最后:
gcc test.c -o /home/examples/bin/test -I/usr/include -L/lib -lipc -lpcd -lrt