Linking issue with Matlab Coder....
4 次查看(过去 30 天)
显示 更早的评论
Hi, I am trying to link to some existing precompiled libraries using Matlab Coder. Within my code I have the following.....
libPriority = '';
libPreCompiled = true;
libLinkOnly = true;
linkPath = '/home/arwel/Documents/coding/multinestEdits/eggboxOnly/MultiNest_v3.10_eggboxOnly/multinest_eggboxOnly/lib';
coder.updateBuildInfo('addLinkObjects','libmultinest.so',linkPath,libPriority,libPreCompiled,libLinkOnly);
coder.updateBuildInfo('addLinkObjects','libmultinest.so.3.10',linkPath,libPriority,libPreCompiled,libLinkOnly);
coder.ceval('mainRoutine',0,[]);
When i try to make the mex in Coder, it fails during the testing of the generated mex. However it will still make the mex.
If I try to run it I get the following error message...
>> multinestCaller_mex() Invalid MEX-file '<.......>/multinestTests/multinestCaller_mex.mexa64': libmultinest.so.3.10: cannot open shared object file: No such file or directory.
I have verified that both 'libmultinest.so' and 'libmultinest.so.3.10' are in the same directory. Why is it that it seems to find one library and not the other, given that they are both in the same place?
2 个评论
Sumit Ghosh
2018-3-23
编辑:Sumit Ghosh
2018-3-23
You may try using ldd on the mex file to figure out what .so file libmultinest.so is being resolved to. Once you verify that, you can try to put libmultinest.so.3.10 in the same path or put a symlink to libmultinest.so.3.10.
回答(1 个)
Anakin Zheng
2018-7-26
Hi Arwel,
Can you check whether '/home/arwel/Documents/coding/multinestEdits/eggboxOnly/MultiNest_v3.10_eggboxOnly/multinest_eggboxOnly/lib' is on your LD_LIBRARY_PATH?
Anakin
0 个评论
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!