Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Undeclared variables

Undeclared variables

This was an error that I got with 1.9.3, I'm now seeing it with 1.10.0 dev9
I get several errors similar to the following:
WebModel.c: In function 'WebModel_eqFunction_10199':
WebModel.c:47889: error: '$PDrivenRoll_5$POut$lB2$rB$PTension' undeclared (first use in this function)
WebModel_06inz.c: In function 'WebModel_eqFunction_5763':
WebModel_06inz.c:70367: error: '$PDrivenRoll_5$POut$lB2$rB$PTension' undeclared (first use in this function)

Re: Undeclared variables

I am also getting similar error


DQKern_ProcessHT.Chap11.Two.Main.c: In function 'DQKern_ProcessHT_Chap11_Two_Main_eqFunction_64':
DQKern_ProcessHT.Chap11.Two.Main.c:299: error: '$PG$lB11$rB' undeclared (first use in this function)
DQKern_ProcessHT.Chap11.Two.Main.c:299: error: (Each undeclared identifier is reported only once
DQKern_ProcessHT.Chap11.Two.Main.c:299: error: for each function it appears in.)
\MinGW\bin\mingw32-make: *** [DQKern_ProcessHT.Chap11.Two.Main.o] Error 1
\MinGW\bin\mingw32-make: *** Waiting for unfinished jobs....
Compilation process failed. Exited with code 2.

Re: Undeclared variables

This error ended up being caused by an index that was out of range for certain conditions. The IB2 was the second element of that array, and there was a case where that could have been out of the size of the array. I ended up fixing it with an if-then statement to make sure the equation was valid for all potential sizes of the array.

There are 0 guests and 0 other users also viewing this topic