ModelSim - MATLAB cosimulation not running!!!

8 visualizzazioni (ultimi 30 giorni)
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.

Risposta accettata

Tao Jia
Tao Jia il 9 Feb 2018
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 Commento
Md. Fahim Faysal
Md. Fahim Faysal il 15 Feb 2018
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

Accedi per commentare.

Più risposte (1)

Md. Fahim Faysal
Md. Fahim Faysal il 15 Feb 2018
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.

Categorie

Scopri di più su Introduction to Installation and Licensing in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by