﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
4179	compilation error when using multiple media	Ulfsen	somebody	"Hi,

I just tested the development version v1.12.0 with a simple model of a gas-water heat exchanger, which is working in Version 1.9.7. I simplified the model to the following test-code:

{{{
model simple_BasicHX_water_gas
  package Medium1 = Modelica.Media.IdealGases.SingleGases.N2;
  package Medium2 = Modelica.Media.Water.ConstantPropertyLiquidWater;
end simple_BasicHX_water_gas;
}}}

Can't be compiled and give the errors:

C:/OpenModelica1.9.7//share/omc/scripts/Compile.bat TCV.Plant.simple_BasicHX_water_gas gcc mingw64 parallel 4 0
PATH = ""C:\OpenModelica1.9.7\MinGW\bin;C:\OpenModelica1.9.7\MinGW\bin\..\libexec\gcc\mingw32\4.4.0\;""
gcc    -falign-functions -msse2 -mfpmath=sse      -I""C:/OpenModelica1.9.7//include/omc/c"" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TCV_Plant_simple_BasicHX_water_gas -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o TCV.Plant.simple_BasicHX_water_gas.o TCV.Plant.simple_BasicHX_water_gas.c
In file included from TCV.Plant.simple_BasicHX_water_gas.c:2:
TCV.Plant.simple_BasicHX_water_gas_model.h:70: error: expected declaration specifiers or '...' before 'DAEMODE_DATA'
TCV.Plant.simple_BasicHX_water_gas.c:132: warning: initialization from incompatible pointer type
TCV.Plant.simple_BasicHX_water_gas.c:141: warning: initialization makes integer from pointer without a cast
TCV.Plant.simple_BasicHX_water_gas.c:148: warning: initialization from incompatible pointer type
TCV.Plant.simple_BasicHX_water_gas.c:149: warning: initialization from incompatible pointer type
TCV.Plant.simple_BasicHX_water_gas.c:150: warning: initialization from incompatible pointer type
TCV.Plant.simple_BasicHX_water_gas.c:151: warning: initialization from incompatible pointer type
TCV.Plant.simple_BasicHX_water_gas.c:152: warning: initialization from incompatible pointer type
TCV.Plant.simple_BasicHX_water_gas.c:153: warning: initialization from incompatible pointer type
TCV.Plant.simple_BasicHX_water_gas.c:154: warning: initialization makes integer from pointer without a cast
TCV.Plant.simple_BasicHX_water_gas.c:155: warning: initialization makes integer from pointer without a cast
TCV.Plant.simple_BasicHX_water_gas.c:158: warning: initialization makes pointer from integer without a cast
TCV.Plant.simple_BasicHX_water_gas.c:159: warning: initialization makes pointer from integer without a cast
TCV.Plant.simple_BasicHX_water_gas.c:166: warning: initialization from incompatible pointer type
TCV.Plant.simple_BasicHX_water_gas.c:167: warning: initialization from incompatible pointer type
TCV.Plant.simple_BasicHX_water_gas.c:168: warning: initialization from incompatible pointer type
TCV.Plant.simple_BasicHX_water_gas.c:169: warning: initialization from incompatible pointer type
TCV.Plant.simple_BasicHX_water_gas.c:170: warning: initialization from incompatible pointer type
TCV.Plant.simple_BasicHX_water_gas.c:171: warning: initialization from incompatible pointer type
TCV.Plant.simple_BasicHX_water_gas.c:172: warning: initialization from incompatible pointer type
TCV.Plant.simple_BasicHX_water_gas.c:173: warning: initialization from incompatible pointer type
TCV.Plant.simple_BasicHX_water_gas.c:174: warning: initialization from incompatible pointer type
TCV.Plant.simple_BasicHX_water_gas.c:175: warning: initialization from incompatible pointer type
TCV.Plant.simple_BasicHX_water_gas.c:176: warning: initialization from incompatible pointer type
TCV.Plant.simple_BasicHX_water_gas.c:177: warning: initialization from incompatible pointer type
TCV.Plant.simple_BasicHX_water_gas.c:178: warning: excess elements in struct initializer
TCV.Plant.simple_BasicHX_water_gas.c:178: warning: (near initialization for 'TCV_Plant_simple_BasicHX_water_gas_callback')
TCV.Plant.simple_BasicHX_water_gas.c:184: warning: excess elements in struct initializer
TCV.Plant.simple_BasicHX_water_gas.c:184: warning: (near initialization for 'TCV_Plant_simple_BasicHX_water_gas_callback')
TCV.Plant.simple_BasicHX_water_gas.c:187: warning: excess elements in struct initializer
TCV.Plant.simple_BasicHX_water_gas.c:187: warning: (near initialization for 'TCV_Plant_simple_BasicHX_water_gas_callback')
TCV.Plant.simple_BasicHX_water_gas.c: In function 'TCV_Plant_simple_BasicHX_water_gas_setupDataStruc':
TCV.Plant.simple_BasicHX_water_gas.c:266: error: 'MODEL_DATA' has no member named 'nSensitivityVars'
TCV.Plant.simple_BasicHX_water_gas.c:267: error: 'MODEL_DATA' has no member named 'nSensitivityParamVars'
TCV.Plant.simple_BasicHX_water_gas.c: In function 'main':
TCV.Plant.simple_BasicHX_water_gas.c:295: error: 'compiledInDAEMode' undeclared (first use in this function)
TCV.Plant.simple_BasicHX_water_gas.c:295: error: (Each undeclared identifier is reported only once
TCV.Plant.simple_BasicHX_water_gas.c:295: error: for each function it appears in.)
\MinGW\bin\mingw32-make: *** [TCV.Plant.simple_BasicHX_water_gas.o] Error 1
Compilation process failed. Exited with code 2.

"	defect	closed	high	Future	*unknown*	v1.12.0	worksforme		
