ld找不到。所以库

2024-06-17 13:06:23 发布

您现在位置:Python中文网/ 问答频道 /正文

在尝试设置Python包(mlabwrap)时,我收到以下链接错误:

/usr/bin/ld: cannot find -leng
/usr/bin/ld: cannot find -lmx 
/usr/bin/ld: cannot find -lmat
/usr/bin/ld: cannot find -lut

构建命令如下所示:

c++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/mlabraw.o -L/usr/local/MATLAB/R2015a/bin/glnx86 -Wl,-R/usr/local/MATLAB/R2015a/bin/glnx86 -leng -lmx -lmat -lut -lstdc++ -o build/lib.linux-x86_64-2.7/mlabrawmodule.so

指定目录的grep显示所有必需的共享对象库都存在:

^{pr2}$

有人知道为什么链接器不能识别必要的库吗?有没有更好的方法来调试链接器,看看它在哪里寻找这些库?在

据我所知,编译字符串的-L/usr/local/MATLAB/R2015a/bin/glnx86部分应该将链接器指向该文件夹。在


Tags: bin链接usrlocalfindmatlabldwl