-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing ModelicaExternalC.dll in Modelica #2
Comments
The library should work out-of-the-box with Dymola. ModelicaExternalC.dll (and in fact all DLLs) is not required by Dymola. Only ED_XMLFile.lib and expat.lib from the library and ModelicaExternalC.lib from the Dymola installation are needed for linking an executable of XMLTest1. |
That's what I thought should happen. However, I get the error message above when I use version 1.0.2 of ExternData. |
Did you open package.mo in Dymola? What happens if you delete all DLLs from the Library dirs? |
You must not use ExternData\Resources\thirdParty\ITI\win32\ModelicaExternalC.lib with Dymola. This is only for building the DLLs for SimulationX from ITI. Dymola provides its own ModelicaExternalC.lib. |
Deleting all of the DLL files from the ExternData Library folders seems to have fixed the problem. The simulations run and I no longer get the error message. Thank you for your help and your quick responses. |
Glad that it works for you. But strange, I thought I checked this. I'll try to reproduce it next week with Dymola 2015 and 2016. I'll leave this issue open meanwhile. |
Actually I cannot reproduce the problem you mentioned with Dymola 2016. I downloaded ExternData 1.0.2 from the releases, extracted it to an empty directory and opened package.mo in Dymola 2016. The example models work out of the box. |
@thorade Thank you for reproducing the issue. If I only would know what goes wrong here? Do you have any clue (since you are an experienced Dymola user)? |
I believe it might be related to another issue I once encountered: |
Do you use MSVC or MinGW compiler? In my case it is MSVC. |
In case of MSVC the linker option |
I tried Visual Studio 2013 Community Edition, all examples have the same error. Where would I specify the linker option and where can I find the output? |
Please set set LINK=%DYMOLALINK% /stack:0x500000 /NODEFAULTLIB:LIBCD /NODEFAULTLIB:LIBC /NODEFAULTLIB:LIBCMT /OPT:NOREF %liblink% %libdsLib% %DELAYARG1% %DELAYARG2% dymosim.obj %EXTRALIB% to set LINK=%DYMOLALINK% /VERBOSE:Lib /stack:0x500000 /NODEFAULTLIB:LIBCD /NODEFAULTLIB:LIBC /NODEFAULTLIB:LIBCMT /OPT:NOREF %liblink% %libdsLib% %DELAYARG1% %DELAYARG2% dymosim.obj %EXTRALIB% Please run the translation again and watch the output in the Dymola log. |
OK, I changed that line and here is the complete content from the buildlog.txt:
|
Thanks. Looks OK though since ED_XMLFile.lib and expat.lib are linked as expected. Need to check the linker warning about the imports. Oops!! This is the problem: ED_XMLFile.dll must not be there. |
OK, I will do that. |
Yes, indeed. The link instruction (line 197 of build.bat) contains this The reason why there are both ED_XMLFile.dll and ED_XMLFile.lib in Resources\win32 is simple. This way the lib should work out-of-the-shelf with SimulationX and Dymola (on Win). SimulationX requires the DLL only and Dymola the LIB. |
I'll rename ED_XMLFile.dll to ITI_ED_XMLFile.dll and will release a new version soon. |
Dependecy Walker gives following warning for dymosim.exe:
But I did not yet find which module it is. |
Yes, now it works out of the box! |
Thanks. |
Thanks! |
Sure. Tell me if you see improvement. |
Where previously only ```xml <root> <table>[0,0;0.5,0.25;1,1]</table> </root> ``` worked for arrays, now also ```xml <root> <table> <row>0,0</row> <row>0.5,0.25</row> <row>1,1</row> </table> </root> ``` or even ```xml <root> <table> <val>0<val> <val>0<val> <val>0.5<val> <val>0.25<val> <val>1<val> <val>1<val> </table> </root> ``` work. See #2
Argh, commit links should go to #3. |
I was excited to see this code available, however I get the following error when I load the Modelica code into Dymola and run a simulation on the XMLTest1 model:
The program can't start because ModelicaExternalC.dll is missing from your computer. Try reinstalling the program to fix this problem.
I can find ModelicaExternalC.lib, but not the dynamic library. Do I need to to change something in the ExternData code in order for it to look for the static library, not the dynamic library?
System specifics:
Windows 7 Enterprise SP1
Dymola 2015 and 2016 32-bit and 64-bit versions
The text was updated successfully, but these errors were encountered: