- See if a newer version of MATLAB uses v3.3 and upgrade.
- Force MATLAB itself to use v3.3 (I don't know if this is possible, but you could contact MathWorks Tech Support to see what they recommend).
- Create an executable or some kind of out-of-process server to perform operations that call into your desired versions of libraries, and call into that from your MEX file.
Avoid using the built-in libs
2 views (last 30 days)
Show older comments
Hello
I've the following problem. I use a library which needs a different lapack version than the built-in matlab lapack (matlab has 3.1, I need 3.3). So I linked against the newer version which I've installed on my system and ldd showed me that the resulting .mexa64 linked correctly against it. But at runtime, the internal matlab lapack is used.
I compiled it with mex test.cpp -L<pathToMyLapack> -llapack and added the path to the LD_LIBRARY_PATH environment before starting matlab.
So my question is, how can I tell matlab to use my lapack and prevent it to use it's internal mllapack? The same problem appears with different versions of boost, std, ....
Regards
Juergen
0 Comments
Answers (3)
Kaustubha Govind
on 17 Oct 2011
Note that MEX files are actually DLLs (with a slightly different extension). AFAIK, the standard behavior on Windows machines is that if the OS finds that the executable (in this case, MATLAB.exe) has already loaded the required DLL (LAPACK or other libraries), then it will attempt to use the one that is already in memory. So I guess the only alternatives are to:
0 Comments
Juergen Wiest
on 17 Oct 2011
1 Comment
Kaustubha Govind
on 18 Oct 2011
Juergen: I'm not sure what kind of issues switching the lapack version would cause. Again, Tech Support may be able to advise better.
See Also
Categories
Find more on Write C Functions Callable from MATLAB (MEX Files) in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!