Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

problem in running a m-file

조회 수: 3 (최근 30일)
Mahnaz
Mahnaz 2012년 10월 26일
마감: MATLAB Answer Bot 2021년 8월 20일
Hello
I have a m-file(comdll.m) with following functions:
tic
loadlibrary('comdll','comheader');
calllib('comdll','initialize',1,1);
unloadlibrary('comdll');
toc
when I run this m-file i see in command window:
>> comdll
Mex file entry point is missing. Please check the (case-sensitive)
spelling of mexFunction (for C MEX-files), or the (case-insensitive)
spelling of MEXFUNCTION (for FORTRAN MEX-files).
??? Invalid MEX-file 'C:\...comdll.dll': .
what is the problem?

답변 (3개)

Kaustubha Govind
Kaustubha Govind 2012년 10월 26일
You should probably rename your .m file (comdll.m) so that it doesn't clash with commdll.dll. If you type which commdll in the MATLAB command window, you should see that it is picking up the DLL over your MATLAB script. This is because in older versions of MATLAB, MEX functions used to have .DLL extensions on Windows.

Jan
Jan 2012년 10월 26일
편집: Jan 2012년 10월 26일
"comdll" is the name of the DLL and of the M-file? I'd try to use different names at first. It seems like Matlab tries to execute the DLL as Mex-function.

Mahnaz
Mahnaz 2012년 10월 26일
thanks
i renamed the m-file and it doesn't have any problem.

이 질문은 마감되었습니다.

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by