DLL module not found upon compiling

5 Ansichten (letzte 30 Tage)
kristof paredis
kristof paredis am 29 Apr. 2019
Kommentiert: Sébastien am 16 Mai 2024
Hi All,
I have a piece of code that works quite smooth in matlab itself, and now I try to compile it into an executable, but it returns the following error.
there was an error loading the library "DataSourceDLL.dll"
The specified module could not be found.
Bear in mind that I am no expert in DLL's etcetera, but based on previous Q&A's I have
  • converted the header into an m.file using this procedure : https://www.mathworks.com/help/compiler/matlab-library-loading.html
  • tried to load everything into the executable with the -a command while compiling
  • I noticed with dependency walker that some modules showed CPU x86 and some x64 (though surprising to see that most of them are x86, while I run a 64bit machine), could this be the problem? I would actually expect it to be a problem as well when running the code from Matlab itself? Edit, the dll, matlab and the compiler are all 64 bit
any other ideas or solutions?
Thanks,
Kris

Akzeptierte Antwort

kristof paredis
kristof paredis am 6 Mai 2019
Credits to Mathworks support:
  • add the thunkfile dll to the application using -a command, see here for more information:
  • add that DataSourceDLL.dll and all other dependent dlls to the application (dependencywalker will tell you which dlls are missing)
thanks to Matlab support!

Weitere Antworten (1)

Jan
Jan am 29 Apr. 2019
  4 Kommentare
kristof paredis
kristof paredis am 2 Mai 2019
Hi Jan,
My apologies, I was in a hurry and indeed my answer was not very clear.
I was only referring to the fact that my error does not mention any SDK error, but I did the instal and made it the active compiler and still it returned the same error.
I am running Win 7, and I do not have MS Visual installed (that appears to be causing the problems for Win 10 in the link you provided).
Again, thanks for your help!
Sébastien
Sébastien am 16 Mai 2024
Did you solve the problem? I have exactly the same issue

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange

Produkte


Version

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by