Linking issue with Matlab Coder....
Mostra commenti meno recenti
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 Commenti
Sumit Ghosh
il 23 Mar 2018
Modificato: Sumit Ghosh
il 23 Mar 2018
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.
Arwel
il 26 Lug 2018
Risposte (1)
Anakin Zheng
il 26 Lug 2018
0 voti
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
Categorie
Scopri di più su MATLAB Coder in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!