11 | | r_arr := list(stringReal(s) for s in args); |
12 | | s_arr := list(String(r) for r in {1,2,3,4,5}); |
13 | | out := listAppend(args,s_arr); |
| 12 | r_arr := list(stringReal(s) for s in args); |
| 13 | s_arr := list(String(r) for r in r_arr); |
| 14 | out := listAppend(args,s_arr); |
33 | | fail() |
| 32 | "Error: Error building simulator. Build log: clang -I"/Users/henning/src/OpenModelica/build/include/omc/c" -g -O0 -march=native -c -o Main_main.o Main_main.c |
| 33 | /Users/henning/src/OpenModelica/mmc/Main.mo:11:16: warning: implicit declaration of function 'modelica_metatype_to_modelica_string' is invalid in C99 [-Wimplicit-function-declaration] |
| 34 | tmp4 = modelica_metatype_to_modelica_string(_r, ((modelica_integer) 0), 1); |
| 35 | ^ |
| 36 | /Users/henning/src/OpenModelica/mmc/Main.mo:11:14: warning: incompatible integer to pointer conversion assigning to 'modelica_string' (aka 'void *') from 'int' [-Wint-conversion] |
| 37 | tmp4 = modelica_metatype_to_modelica_string(_r, ((modelica_integer) 0), 1); |
| 38 | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 39 | 2 warnings generated. |
| 40 | clang -I"/Users/henning/src/OpenModelica/build/include/omc/c" -g -O0 -march=native -c -o Main_main_records.o Main_main_records.c |
| 41 | clang -single_module -dynamiclib -flat_namespace -o Main_main.dylib Main_main.o Main_main_records.o -I"/Users/henning/src/OpenModelica/build/include/omc/c" -g -O0 -march=native -L"/Users/henning/src/OpenModelica/build/lib/x86_64-darwin15.3.0/omc" -Wl,-rpath,'/Users/henning/src/OpenModelica/build/lib/x86_64-darwin15.3.0/omc' -lOpenModelicaRuntimeC -llapack -lblas -lm -lm |
| 42 | Undefined symbols for architecture x86_64: |
| 43 | "_modelica_metatype_to_modelica_string", referenced from: |
| 44 | _omc_Main_main in Main_main.o |
| 45 | ld: symbol(s) not found for architecture x86_64 |
| 46 | clang: error: linker command failed with exit code 1 (use -v to see invocation) |
| 47 | make: *** [Main_main] Error 1 |
| 48 | " |
36 | | |
37 | | |
38 | | Another thing is that I cannot use list() in the script: |
39 | | {{{ |
40 | | Main.main(list("1","2","3","4","5","6","7","8")); |
41 | | }}} |
42 | | leads to |
43 | | {{{ |
44 | | "[Main.mos:3:1-3:49:writable] Error: Class list not found in scope <global scope> (looking for a function or record). |
45 | | " |
46 | | }}} |
| 51 | So, list(stringReal(...)...) seems to loose information of element type (should be modelica_real, but is modelica_metatype). |