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

Simulations (incl. Examples.XLSXTest) with XLSX do not compile on OpenModelica (v1.20, MSL4.0.0) #44

Closed
ppenguin opened this issue Mar 16, 2023 · 3 comments
Labels

Comments

@ppenguin
Copy link

When trying to simulate a basic model using XLSXFile under OM I get the following error:

XLSXTest_08bnd.c: In function 'XLSXTest_eqFunction_15':
XLSXTest_08bnd.c:60:122: error: too many arguments to function 'omc_ExternData_XLSXFile'
   60 |   (data->simulationInfo->realParameter[4]/* sumB PARAM */)  = omc_ExternData_Examples_XLSXTest_computeColSum(threadData, omc_ExternData_XLSXFile(threadData, (data->simulationInfo->stringParameter[0]/* dataSource.fileName PARAM */) , (data->simulationInfo->booleanParameter[0]/* dataSource.verboseRead PARAM */) , (data->simulationInfo->integerParameter[0]/* dataSource.detectMissingData PARAM */) , (data->simulationInfo->extObjs[0])), _OMC_LIT12, _OMC_LIT0, ((modelica_integer) 2), omc_ExternData_Functions_XLSX_getArrayRows2D(threadData, _OMC_LIT0, (data->simulationInfo->extObjs[0])));
      |                                                                                                                          ^~~~~~~~~~~~~~~~~~~~~~~
In file included from XLSXTest_model.h:27,
                 from XLSXTest_08bnd.c:2:
XLSXTest_functions.h:46:21: note: declared here
   46 | ExternData_XLSXFile omc_ExternData_XLSXFile (threadData_t *threadData, modelica_string omc_fileName, modelica_boolean omc_verboseRead, modelica_integer omc_detectMissingData);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~
At top level:
cc1: note: unrecognized command-line option '-Wno-parentheses-equality' may have been intended to silence earlier diagnostics
make: *** [<builtin>: XLSXTest_08bnd.o] Error 1
make: *** Waiting for unfinished jobs....
Compilation process failed. Exited with code 2.

This occurs with the included example model XLSXTest and similarly with XLSTest.
It appears that the OMC generated function for omc_ExternData_XLSXFile has an additional (5th) argument data->simulationInfo->extObjs[0] that is not defined in the prototype.

Might this be a library compatibility issue, and is there a known fix or workaround for this?

@beutlich
Copy link
Contributor

Can you please try with OMC 1.21.0-dev and report the issue to the OM devs if it still fails. Thanks.

@bilderbuchi
Copy link

On OMEdit master at least XLSXTest seems to work: https://libraries.openmodelica.org/branches/master/ExternData/ExternData.html

@beutlich
Copy link
Contributor

Thanks for confirmation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants