pengxihan 发表于 2008-01-31 11:50

问一个应用程序编译链接的问题

linux下面的应用程序在编译链接时,如果我没有指定链接库,这时候:
1.是不是到编译器默认的路径下去找?
2.如果是,对于某个函数来说,默认路径下有那么多的库文件,链接器怎么找到这个函数是属于哪一个库的呢?难道是一个个搜的?

xpdsq 发表于 2008-02-02 09:19

用 gcc的话,不是可以自动的嘛

rockins 发表于 2008-02-02 12:35

you should point out which library is needed, and most importantly, you have to arrange them in right order. if you do not tell gcc what library is used, linker will complain with errors.
页: [1]
查看完整版本: 问一个应用程序编译链接的问题