Comments (26)
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.
from externdata.
That's what I thought should happen. However, I get the error message above when I use version 1.0.2 of ExternData.
from externdata.
Did you open package.mo in Dymola? What happens if you delete all DLLs from the Library dirs?
from externdata.
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.
from externdata.
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.
from externdata.
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.
from externdata.
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.
from externdata.
I can confirm this issue exists. Did a fresh clone, then tried to run XMLTest1 with Dymola 2016.
from externdata.
@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)?
from externdata.
I believe it might be related to another issue I once encountered:
ibpsa/modelica-ibpsa#40
If I manage to fix it, I will report a solution here.
from externdata.
Do you use MSVC or MinGW compiler? In my case it is MSVC.
from externdata.
In case of MSVC the linker option /VERBOSE:Lib
displays a list of found lib dependencies.
from externdata.
I tried Visual Studio 2013 Community Edition, all examples have the same error.
The fix suggested by jnangle works:
After deleting all dll files from ExternData\ExternData\Resources\Library\win32
the examples simulate.
This also means that my first idea for a fix was wrong, must be something else.
Where would I specify the linker option and where can I find the output?
from externdata.
Please set /VERBOSE:Lib
in file build.bat of your "Dymola 2016\bin" install directory. Edit line 197 from
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.
from externdata.
OK, I changed that line and here is the complete content from the buildlog.txt:
Compiling and linking the model (Visual C++).
dsmodel.c
Searching libraries
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\user32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\advapi32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\comdlg32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\wsock32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\comctl32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\netapi32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\dnsapi.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\wininet.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\shell32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\gdi32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\ws2_32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\shlwapi.lib:
Searching C:/Program Files (x86)/Dymola 2016\bin\lib\libds.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\ole32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\OleAut32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\Wbemuuid.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\Wintrust.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\crypt32.lib:
Searching C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\LIB\delayimp.lib:
Searching C:/Users/mthorade/Documents/Dymola/ExternData/ExternData/Resources/Library/win32\ED_XMLFile.lib:
Searching C:/Users/mthorade/Documents/Dymola/ExternData/ExternData/Resources/Library/win32\expat.lib:
Searching C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\LIB\MSVCRT.lib:
Searching C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\LIB\OLDNAMES.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\uuid.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\kernel32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\user32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\advapi32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\comdlg32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\wsock32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\comctl32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\netapi32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\dnsapi.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\wininet.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\shell32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\gdi32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\ws2_32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\shlwapi.lib:
Searching C:/Program Files (x86)/Dymola 2016\bin\lib\libds.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\ole32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\OleAut32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\Wbemuuid.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\Wintrust.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\crypt32.lib:
Searching C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\LIB\delayimp.lib:
Searching C:/Users/mthorade/Documents/Dymola/ExternData/ExternData/Resources/Library/win32\ED_XMLFile.lib:
Searching C:/Users/mthorade/Documents/Dymola/ExternData/ExternData/Resources/Library/win32\expat.lib:
Searching C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\LIB\MSVCRT.lib:
Searching C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\LIB\OLDNAMES.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\uuid.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\kernel32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\user32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\advapi32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\comdlg32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\wsock32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\comctl32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\netapi32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\dnsapi.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\wininet.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\shell32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\gdi32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\ws2_32.lib:
Finished searching libraries
Creating library dymosim.lib and object dymosim.exp
Searching libraries
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\user32.lib:
Finished searching libraries
Searching libraries
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\user32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\advapi32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\comdlg32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\wsock32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\comctl32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\netapi32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\dnsapi.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\wininet.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\shell32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\gdi32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\ws2_32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\shlwapi.lib:
Searching C:/Program Files (x86)/Dymola 2016\bin\lib\libds.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\ole32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\OleAut32.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\Wbemuuid.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\Wintrust.lib:
Searching C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\crypt32.lib:
Searching C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\LIB\delayimp.lib:
Searching C:/Users/mthorade/Documents/Dymola/ExternData/ExternData/Resources/Library/win32\ED_XMLFile.lib:
Searching C:/Users/mthorade/Documents/Dymola/ExternData/ExternData/Resources/Library/win32\expat.lib:
Searching C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\LIB\MSVCRT.lib:
Finished searching libraries
LINK : warning LNK4199: /DELAYLOAD:ED_XMLFile.dll ignored; no imports found from ED_XMLFile.dll
Successful generation of Dymosim.
from externdata.
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.
from externdata.
OK, I will do that.
As deleting the dlls from the Resources\Library\win32
directory seems to fix the problem, I would assume they are the problematic part!? Are they needed or would it be an option to deliver the library without dlls?
from externdata.
Yes, indeed. The link instruction (line 197 of build.bat) contains this DELAYLOAD:
option. Since ED_XMLFile.dll and ED_XMLFile.lib have the same name this leads to the conflict.
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.
from externdata.
I'll rename ED_XMLFile.dll to ITI_ED_XMLFile.dll and will release a new version soon.
from externdata.
Dependecy Walker gives following warning for dymosim.exe:
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.
But I did not yet find which module it is.
from externdata.
@thorade Can you please git clone again (to a new directory) and check simulation with Dymola again. Should be fixed by 26754cb.
from externdata.
Yes, now it works out of the box!
from externdata.
Thanks.
from externdata.
Thanks!
I might be using the JSON reader in the future.
from externdata.
Sure. Tell me if you see improvement.
from externdata.
Argh, commit links should go to #3.
from externdata.
Related Issues (20)
- Dymola 2019 model check fails on class methods HOT 18
- OpenModelica HOT 11
- cannot find cell value HOT 3
- Compilation fails in Dymola 2019 FD01 with MinGW GCC HOT 2
- GCC compatiblitiy HOT 1
- Read 1D or 2D arrays HOT 19
- Fix problem with tir file example HOT 1
- throw error when variable not found HOT 12
- Writing results to different file types? HOT 2
- Evaluation at translation time and compliance with Modelica Specification HOT 3
- Read Dynamically Set Arrays from .mat File HOT 1
- CSVTest causing a translation and scripting error in OpenModelica HOT 4
- SimulationX binaries does not fit anymore HOT 2
- support for arm64 HOT 2
- Simulations (incl. `Examples.XLSXTest`) with `XLSX` do not compile on OpenModelica (v1.20, MSL4.0.0) HOT 3
- Compilation fails, linker cannot find ED_JSONFile [linux/macos] HOT 5
- MATTest example files doesn't work on last Openmodelica HOT 6
- getBoolean inconsistency between XMLFile and JSONFile HOT 1
- Dymola 2024x Refresh 1 Beta 1 - Experiments using ExternData will not compile HOT 6
- How to get value in array of structures in json? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from externdata.