ModelSim - MATLAB cosimulation not running!!!

9 次查看(过去 30 天)
After starting the cosimulation in modelsim version 10.4a (by running vsimulink work.inverter) I get the following error:
# Loading D:/Program Files/MATLAB/R2017b/toolbox/edalink/extensions/modelsim/windows32/liblfmhdls_gcc421vc12.dll # Error: (vsim-3193) Load of "D:/Program Files/MATLAB/R2017b/toolbox/edalink/extensions/modelsim/windows32/liblfmhdls_gcc421vc12.dll" failed: Bad DLL format. # # Warning: (vsim-FLI-3160) Failed to load FLI object file "D:/Program Files/MATLAB/R2017b/toolbox/edalink/extensions/modelsim/windows32/liblfmhdls_gcc421vc12.dll".
I searched online and found some people saying its a 64 bit, 32 bit version problem. But the file is clearly seemed to be inside "windows32/" folder.
How can I fix this error? Stuck here for hours. Anykind of help will be very much appreciated. Thank you.

采纳的回答

Tao Jia
Tao Jia 2018-2-9
First, we need to determine if your ModelSim is 32-bit or 64bit. The easiest way to check this is to look at the title of ModelSim window. If it says something like "ModelSim SE-64", then you have a 64 bit ModelSim. In that case, we are loading the wrong DLL (32bit) into your ModelSim. We can further investigate why it does not work.
If there is no "-64" in your window title, then you do have a 32-bit ModelSim. It might be the problem that you don't have the visual studio redistribute installed in your machine. The shared DLL that we compiled requires Visual Studio 2013 redistribute. You can get it from Microsoft website here:
https://www.microsoft.com/en-us/download/details.aspx?id=40784
You'll need to make sure that you installed the 32-bit version.
Let me know if you still have problem. Also, please let me know the ModelSim type that you have, is it SE, PE, or DE version?
  1 个评论
Md. Fahim Faysal
Md. Fahim Faysal 2018-2-15
Thanks a lot for the reply. I have found the problem. I did not have Visual Studio 2013 redistribute. I had 2012, 2015 but not 2013. I have downloaded and installed the 2013 C++ redistribute and it worked like a charm!!
Thank you very much once again, really appreciate the help. Regards

请先登录,再进行评论。

更多回答(1 个)

Md. Fahim Faysal
Md. Fahim Faysal 2018-2-15
Also I found another way around. If we use liblfmhdls_gcc421vc 9.dll instead of liblfmhdls_gcc421vc 12.dll that comes with R2017b, then it also works. The liblfmhdls_gcc421vc 9.dll can be found with R2013a. Thank you.

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by