Error ThunkLoadFailed when loading a dll in a compiled m-File

조회 수: 1 (최근 30일)
tormy
tormy 2012년 5월 22일
Hello folks,
I am currently trying to compile an m-file which is utilizing a 64bit dll i wrote. I have already created the prototype file for using it with the syntax
[notfound,warnings] = loadlibrary('CCode/sharelib.dll',@prototype,'alias','sharelib');
where @prototype is the handle to the m-file i created from the corresponding h-file.
When executing the m-file from the matlab command-line, everything works fine. However, when i compile the code an try to run the executable, the windows command prompt yields the following error message:
status =
1
message =
''
Error using loadlibrary (line 419)
Das angegebene Modul wurde nicht gefunden.
Error in Start_Raytracer (line 28)
MATLAB:loadlibrary:ThunkLoadFailed
The german sentence means "the specified module could not be found."
Especially the line "MATLAB:loadlibrary:ThunkLoadFailed" makes me wonder, because i cannot find that line neither inside the loadlibrary function nor on the internet.
Thanks alot for any comment on this =)
Alex

채택된 답변

Philip Borghesani
Philip Borghesani 2012년 5월 22일
You need to add the thunk file to the executable produced. Use the -a option to mcc to include the thunk dll in the archive. Look in the directory containing the prototype file for the thunk file.
  댓글 수: 1
tormy
tormy 2012년 5월 23일
I thought I have tried so yesterday evening, but you have been absolutely right.
Thank you very much!

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by