Skip to content
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

Record constructors not generated correctly in ExternalMedia library #8592

Closed
casella opened this issue Feb 21, 2022 · 1 comment
Closed
Assignees
Labels
COMP/OMC/Codegen Issue and pull request related to Code generation

Comments

@casella
Copy link
Contributor

casella commented Feb 21, 2022

Download the ExternalMedia 3.3.1 library from the Github release page: https://github.com/modelica-3rdparty/ExternalMedia/releases/download/v3.3.1/ExternalMedia_v3.3.1.zip

If I run ExternalMedia.Test.TestMedium.TestStatesSat with the latest nightly build on Windows, there are several warnings such as

TestStatesSat_functions.c:113:42: warning: incompatible pointer types passing 'ExternalMedia_Test_TestMedium_TestStatesSat_Medium_SaturationProperties *' to parameter of type 'ExternalSaturationProperties *' (aka 'struct ExternalSaturationProperties *') [-Wincompatible-pointer-types]
  TwoPhaseMedium_setSat_T_C_impl(_T_ext, &_sat_ext, MMC_STRINGDATA(MMC_REFSTRINGLIT(tmp1)), MMC_STRINGDATA(MMC_REFSTRINGLIT(tmp2)), MMC_STRINGDATA(MMC_REFSTRINGLIT(tmp3)));
                                         ^~~~~~~~~
D:/Lavoro/Modelica/ExternalMedia 3.3.1/Resources/Include\externalmedialib.h:197:99: note: passing argument to parameter 'sat' here
        EXTERNALMEDIA_EXPORT void TwoPhaseMedium_setSat_T_C_impl(double T, ExternalSaturationProperties *sat, const char *mediumName, const char *libraryName, const char *substanceName);

and then several errors such as:

TestStatesSat_functions.c:484:9: error: use of undeclared identifier '_completeBubbleDewStates1'
  _MM = _completeBubbleDewStates1._bubbleStateOnePhase._Medium._externalFluidConstants._molarMass;
        ^

and

TestStatesSat_functions.c:1084:9: error: use of undeclared identifier '_completeBubbleDewStates2'
  _MM = _completeBubbleDewStates2._bubbleStateOnePhase._Medium._externalFluidConstants._molarMass;
        ^

@mahge, could you please have a look?

@casella
Copy link
Contributor Author

casella commented Jun 4, 2022

All these issues should now be fixed with 1.19.0 or with 1.20.0-dev, we managed to run the version on the dynamiclib branch successfully on OpenModelica.

@casella casella closed this as completed Jun 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
COMP/OMC/Codegen Issue and pull request related to Code generation
Projects
None yet
Development

No branches or pull requests

2 participants