필터 지우기
필터 지우기

erratic semantic of loadlibrary

조회 수: 2 (최근 30일)
Krzysztof
Krzysztof 2013년 9월 25일
  • Create a library foobar.dll and a header file foobar.h .
  • Create a directory LL and put foobar.dll in it.
loadlibrary foobar
Error using loadlibrary>lFullPath (line 586) Could not find file foobar.h.
That means that MATLAB assumes a header file name when you do not give one. This is undocumented.
  • Create script LL/foobar.m .
loadlibrary foobar
Undefined function or variable 'foobar_proto'.
WHAT?
loadlibrary foobar foobar
Error using foobar: Too many output arguments.
Apparently, when the header name is not given, the prototype name is assumed to be foobar_proto . However, MATLAB does not try to generate the prototype script, as it ordinarily would, by examining the header file foobar.h , and is happy with reporting an error that the prototype does not exist, even if the header file foobar.h actually exists.
On the other hand, when the header name is explicitly given and it corresponds to a script, the script is assumed to contain the prototype and called accordingly.
What an inconsistent mess.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by