#2831 closed defect (fixed)
OMEdit fails to find local dlls on Windows
Reported by: | Per Östlund | Owned by: | Adeel Asghar |
---|---|---|---|
Priority: | high | Milestone: | 1.9.4 |
Component: | OMEdit | Version: | trunk |
Keywords: | Cc: |
Description
If a model uses an external function which specifies a library by using the Library annotation, and the library is in a DLL in the same folder as the model, then OMEdit will fail to execute
the simulation executable. The error message isn't very user friendly, just stating that the simulation crashed and returned the error code -1073741515, which is 0xC0000135 == STATUS_DLL_NOT_FOUND. The reason is simply that OMEdit runs the simulation in %TEMP%/OpenModelica/OMEdit/ and not the folder the model is in, so it will fail to find the dll.
On Linux this works automagically, and it would be nice if it would work on Windows too (and maybe MacOS, I haven't tried it). And maybe it's possible to display error codes in a human readable format too?
Attachments (2)
Change History (7)
by , 10 years ago
Attachment: | ExcelReaderTest.mo added |
---|
by , 10 years ago
Attachment: | ExcelReader.c added |
---|
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Ofcourse this can't work automatically. For translating the model I have to specify the libxl include files directory via cflags option.
If user downloads and installs the libxl in Windows PATH then the system will automatically find the needed header files for compilation and dll for execution.
I don't know how you install libxl in Linux. Perhaps it is in PATH. Because even in Linux OMEdit working directory is %TEMP%/OpenModelica/OMEdit/ so how can OMEdit find the binary?
Also the user can set the working directory via Options before running the simulation.
comment:4 by , 9 years ago
Milestone: | Future → pre1.9.4 |
---|
It doesn't make sense to keep closed ticket in the "Future" milestone that were simply forgotten to assign to the correct milestone in the past.
comment:5 by , 7 years ago
Milestone: | pre1.9.4 → 1.9.4 |
---|
Removing the pre1.9.4 milestone in favor of 1.9.4.
Attached is a test model which uses an external object to read from an excel sheet, which uses libxl. No excel sheet is included, the model should just print an error message that it couldn't open the sheet if it works, or crash if it doesn't.