#3447 closed enhancement (fixed)
Use of msvc flag in OMEdit
Reported by: | Julian Ophey | Owned by: | Adeel Asghar |
---|---|---|---|
Priority: | normal | Milestone: | 1.9.4 |
Component: | OMEdit | Version: | trunk |
Keywords: | msvc | Cc: | Niklas Worschech |
Description
When I use any model out of the MSL, and add the flags in the options:
+d=initialization +simCodeTarget=Cpp +target=msvc
then the simulation failed with the error log:
Modelica.Blocks.Examples.PID_Controller.makefile:17: * missing separator. Stop.
Compilation process failed. Exited with code 2.
Thanks for your support.
Change History (18)
comment:1 by , 9 years ago
Cc: | added; removed |
---|
comment:2 by , 9 years ago
Milestone: | 1.9.3 → 1.9.4 |
---|---|
Status: | new → accepted |
comment:3 by , 9 years ago
comment:4 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
The fix is now available via the nightly build.
comment:5 by , 9 years ago
I tested it with the nightly build version 525-gf0bcb4f but i still get the same error
I used the tools -> options dialog and added to the simulation tab the omc flags +simCodeTarget=Cpp +target=msvc
Is this the correct way to change the simCode target and the compiler target?
comment:6 by , 9 years ago
No. You should choose Cpp
from drop-down options of Target Language
and msvc
from drop-down options of Target Compiler
in Tools->Options->Simulation.
comment:7 by , 9 years ago
Thank you, the compilation works now. But the simulations chrashes with this error
stdout | OMEditInfo | C:/Users/niklwors/AppData/Local/Temp/OpenModelica/OMEdit/Modelica.Blocks.Examples.PID_Controller.exe -port=46411 -logFormat=xml -override=startTime=0,stopTime=4,stepSize=0.008,tolerance=0.0001,solver=dassl,outputFormat=mat,variableFilter=.* -r=Modelica.Blocks.Examples.PID_Controller_res.mat -dasslJacobian=coloredNumerical -w -lv=LOG_STATS
stdout | error |Process crashed
Simulation process failed. Exited with code -1073741515.
Do you know what the problem is?
comment:8 by , 9 years ago
Do you know which binaries are required to run the executable? I set OPENMODELICAHOME/bin as the process environment. If the executable needs more binaries than the ones in bin then it will fail.
Can you run dependency walker on the executable and share a screenshot of it?
comment:9 by , 9 years ago
I think you need to have also in the path: $OPENMODELICAHOME\lib\omc\msvc
if the target is msvc.
comment:10 by , 9 years ago
If the runtime is CPP then I guess you also need to add to the path: $OPENMODELICAHOME\lib\omc\cpp\msvc
follow-up: 13 comment:12 by , 9 years ago
Thank you, if add the paths to the path variable it works.
I noticed that I have to open the tools dialog when I started OMEdit to change the codegenrator.
comment:13 by , 9 years ago
Replying to niklwors:
Thank you, if add the paths to the path variable it works.
You don't have to add the paths to path variable manually. My last commit will add them and set a proper environment automatically. Test it and let me know.
I noticed that I have to open the tools dialog when I started OMEdit to change the codegenrator.
Yes, but you only have to do it once and then OMEdit will remember your settings.
comment:14 by , 9 years ago
the nightly build v1.9.4-dev-667-g37ad4ee still crashes with the same error
This is now fixed in a development branch https://github.com/adeas31/OMEdit/commit/3af330536bb03c5f413c83c0048f5084a5243257. The fix will be available in 1.9.4 final release.