ExternData
ExternData copied to clipboard
Dymola 2024x Refresh 1 Beta 1 - Experiments using ExternData will not compile
While running tests on Dymola 2024x Refresh 1 Beta 1 we found that our models referencing ExternData will no longer compile.
This is the compiler message:
__iob_func is located in msvc_compatibility.h and appears to be there to support some older versions of Visual Studio compilers.
Support for compilers 2012 (and earlier) will not be supported by Dymola 2024x Refresh1 (per the Dymola developers)
It appears that this chunk of code is gone in the newest version of dsutil.h:
Thanks for reporting early during Dymola beta testing.
@HansOlsson Is there some Dymola version macro defined such that I can a add a switch to msvc_compatibility.h when to define __iob_func and when not. This way I can support newest and older Dymola versions. Thank you.
Thanks for reporting early during Dymola beta testing.
@HansOlsson Is there some Dymola version macro defined such that I can a add a switch to msvc_compatibility.h when to define __iob_func and when not. This way I can support newest and older Dymola versions. Thank you.
We are investigating.
The best solution would be to avoid the need for it by not directly using stdin/stdout/stderr (when compiling with VS 2005 (well anything up to VS 2012)). However, it seems that it is integrated at a low level in libxml2 (and possibly other modules).
With directly I mean that fprintf(stdout, ....)
directly use stdout
and is problematic, but printf(...)
only use it indirectly and is thus fine.
In the released version of Dymola 2024x Refresh 1 there is a new flag Advanced.Translation.LinkWithIobFuncStub to address this problem I think. It is set to false by default, but when changed to true the experiments using ExternData that @NateHorn mentioned above will compile again.
@hhammondscott Thanks or the feedback and test. Do you know if there is some Dymola feature to set this flag by default whenever ExternData is utilized?
Sadly I'm not aware of any feature in Dymola that would allow this flag to be set to true whenever ExternData is used. In other libraries where flags need to be set, I've seen them include functions to set the flags or add the flag settings to the Dymola startup script. We've added the flags to the model annotations in the experiments which use ExternData, using __Dymola_experimentFlags(Advanced(Translation(LinkWithIobFuncStub=true))).