How to resolve coder toolbox error message related to .dll files?
2 views (last 30 days)
Show older comments
I was trying to convert a simple addition function in matlab to c code as a practice work. when typed coder in command window, I got the error message related to dll files, as pasted below. Please, suggest a solution to resolve the error.
function code:
function m=fact(n)
%#codegen
coder.inline('never')
m=1;
for x=1:n
m=m*x;
end
end
in command window:
>> coder
MATLAB:dispatcher:loadLibrary Can't reload 'C:\Program Files\MATLAB\R2012b\bin\win64\dastudio.dll'.
Undefined function or variable 'emlcoder.HardwareImplementation'.
Error in C:\Program
Files\MATLAB\R2012b\toolbox\coder\coder\private\getHardwareTypeNames.p>getHardwareTypeNames (line 8)
Error in C:\Program Files\MATLAB\R2012b\toolbox\coder\coder\emlcprivate.p>emlcprivate (line 18)
Undefined function or variable 'emlcoder.HardwareImplementation'.
Error in C:\Program
Files\MATLAB\R2012b\toolbox\coder\coder\private\getHardwareTypeNames.p>getHardwareTypeNames (line 8)
Error in C:\Program Files\MATLAB\R2012b\toolbox\coder\coder\emlcprivate.p>emlcprivate (line 18)
Undefined function or variable 'emlcoder.HardwareImplementation'.
Error in C:\Program
Files\MATLAB\R2012b\toolbox\coder\coder\private\getHardwareVendorNames.p>getHardwareVendorNames (line 7)
Error in C:\Program Files\MATLAB\R2012b\toolbox\coder\coder\emlcprivate.p>emlcprivate (line 18)
Undefined function or variable 'emlcoder.HardwareImplementation'.
Error in C:\Program
Files\MATLAB\R2012b\toolbox\coder\coder\private\getHardwareVendorNames.p>getHardwareVendorNames (line 7)
Error in C:\Program Files\MATLAB\R2012b\toolbox\coder\coder\emlcprivate.p>emlcprivate (line 18)
MATLAB:dispatcher:loadLibrary Can't reload 'C:\Program Files\MATLAB\R2012b\bin\win64\dastudio.dll'.
Caught "std::exception" Exception message is:
FatalException(unknown)
MATLAB:dispatcher:loadLibrary Can't reload 'C:\Program Files\MATLAB\R2012b\bin\win64\rtw_core.dll'.
com.mathworks.jmi.MatlabException: FatalException(unknown)
at com.mathworks.jmi.NativeMatlab.SendMatlabMessage(Native Method)
at com.mathworks.jmi.NativeMatlab.sendMatlabMessage(NativeMatlab.java:219)
at com.mathworks.jmi.MatlabLooper.sendMatlabMessage(MatlabLooper.java:120)
at com.mathworks.jmi.Matlab.mtFevalConsoleOutput(Matlab.java:1608)
at com.mathworks.project.impl.model.MatlabEnumOptionExpression.evaluate(MatlabEnumOptionExpression.java:97)
at com.mathworks.project.impl.model.Configuration$EnumOptionsGenerator.generateValue(Configuration.java:1861)
at com.mathworks.project.impl.model.VariableGraph.generateDefaults(VariableGraph.java:423)
at com.mathworks.project.impl.model.VariableGraph.setDefaultValue(VariableGraph.java:321)
at com.mathworks.project.impl.model.Configuration$MatlabBasedDefaultGenerator$1.run(Configuration.java:1686)
at com.mathworks.project.impl.model.MatlabExpression$4.completed(MatlabExpression.java:197)
at com.mathworks.jmi.MatlabMCR$CompletionHandler.messageReceived(MatlabMCR.java:1574)
>>
0 Comments
Answers (1)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!