我想在 GCC C++ 链接器的杂项部分指定多个 rpaths。
链接器标志:
-Wl,-rpath=/home/cri/Libs1, -Wl,-rpath=/home/cri/Libs2
第一个可以正常工作,但是当我添加第二个时,出现此错误:
/usr/bin/ld: cannot find : No such file or directory
collect2: ld returned 1 exit status
make: *** [libmylib.so] Error 1
我可以就我做错的事寻求帮助吗?
最佳答案
你必须去掉两个标志之间的逗号(我使用它时没有等号):
-Wl,-rpath /home/cri/Libs1 -Wl,-rpath /home/cri/Libs2
这应该有效。
关于c++ - 无法在 Eclipse CDT 中指定多个 rpath,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33519085/