1
votes

I have a DLL file, generated by MATLAB Coder, that contains function Adjust. This functions calls for few outer functions written in outer .m files, e.g PulseFindAdapt:

function [Indexes,NoiseLogBinary,NoiseThreshold]=Adjust(NoiseLog,NoiseTime,MedianLong)%значения аргументов

NoiseLog = NoiseLog/8192;
NoiseLog=NoiseLog-my_medFilt(NoiseLog,MedianLong);
mean = 45;

[Indexes,NoiseLogBinary,NoiseThreshold]=PulseFindAdapt(NoiseLog,NoiseTime,mean,7);
end

When I try to load generated Adjust.dll file using QLibrary, I get following error:

"Cannot load library Adjust.dll: the specified module could not be found"

Here I found a suggestion, that the problem could be to load one of .dll dependencies(last post):

Problem with dependencies

I tried loading other .dll files,containing only one function without and dependencies, and it worked, so the problem isn't in using QLibrary; also tried including headers and linking .cpp files with generated code for functions(e.g PulseFindAdapt), but it didn't work. Any suggestions how to load and use such .dll?

Will appreciate any help!

1
Have you tried using DependencyWalker dependencywalker.com to take a look at the dependencies of Adjust.dll ? - PilouPili
Thanks fow answer! Yes, it really was dependecy issue. I was lack of libiomp5md.dll. Also, my colleague advised me to use static linking instead of dynamic, and that helped me to fix linking errors before executing application. - Alexey Abramov
If it helped you i posted an answer dont't hesitate to upvote ans accept. Thank you - PilouPili

1 Answers

0
votes

For all problem concerning linking error dont' hesitate to use DependencyWalker www.dependencywalker.com .

It wiil give dependency and functions