Netcdf error in Matlab2019a
Mostra commenti meno recenti
I am using Matlab 2019a on Ubuntu 18.04 and am trying to run an executable (which requires certain netcdf libraries) inside a Matlab script via system(./my_program.x). When doing so, I get the following error:
symbol lookup error: /usr/lib/x86_64-linux-gnu/libnetcdff.so.6: undefined symbol: ncopts
However, if I run ./my_progam.x directly from the console, it runs just fine.
Curiously, running the exact same script in Matlab 2018a also works fine.
I am wondering whether this might be because Matlab 2019a uses its own netcdf libraries, which for some reason don't work with this particular executable. I'm not too bothered by the problem, given that I can circumvent it using an earlier Matlab version, but for convenice, I was wondering whether it is possible to instruct Matlab to essentially open the standard console, and execute ./my_progam.x as much "outside" of the Matlab environment as needed, so that it works in the same way as when I do it manually.
1 Commento
Goutam Choudhury
il 11 Dic 2020
Hi Robert,
I am facing the same problem with MATLAB 2020a. The executable works perfectly in my 2016 version but shows the exact same error as yours in the new version. It will be easier for me to work in the new version. I tried setting new environment path by modifying the old env (getenv('PATH')) before running the system('./...') command but nothing changed. I got the same error no matter what env path is set. I am not an expert in matlab and might be missing something here. I would be grateful if you could share what exactly was causing the problem and how you solved it
Goutam
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su NetCDF Files in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!