Netcdf library failure for stand alone application

Hi, I have a routine to convert a text file into netcdf that works fine when I launch it with Matlab. But when I use a standalone version I get the message:
Error using netcdflib
The NetCDF library encountered an error during execution of 'create' function - 'Can't add HDF5 file metadat (NC_EFILEMETA)'.
Error in netcdf.creat (line 59)
MATLAB:imagesci:netcdf:libraryFailure
I assume a library's missing in my exe but how can I ask the deploytool to add it? And then why isn't there anything listed in the mccExcludedFile.log?

 채택된 답변

Walter Roberson
Walter Roberson 2012년 12월 28일

3 개 추천

Remember that the current directory of a stand-alone executable will not be the directory that the user started the .exe from. If you did not specify a specific directory when creating the netcdf file then you would not be certain that you have write access to whatever directory you happen to be in.

댓글 수: 1

Côme
Côme 2012년 12월 28일
Even though that wasn't the problem, your answer actually helped. It made me realize the directory where I tried to create the netcdf file didn't exist and that's why it wouldn't work. I just assumed it would create the necessary path when trying to create the file. It's working if I first create the directory. Thank you.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

질문:

2012년 12월 28일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by