开发者

cannot specify root sdk directory with syslibroot when linking

I have a few static libraries I want to link with ld. My libraries are in the directories /Users/rlt/p4/lib/ and /Users/rlt/p4/usr2/lib. I want to pass in the relative paths of these directories w.r.t /Users/rlt/p4 and use the -syslibroot to point to this directory. The documentation for ld says that this option will prepend a pre-fix to all search paths. However, the following command gives me directory not found errors for both paths I specify:

ld -syslibroot /Users/rlt/p4 -L/lib -L/usr2/lib -lA -lB -lC开发者_JAVA百科

This gives me could not find /lib and /usr2/lib. I tried using -Lusr2/lib and -Llib with same results. What am I missing?


-syslibroot does not prepend its argument string to arbitrary paths. It will only add it to the paths which are consistent with the sdk directory structure.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜