Opened 6 years ago
Last modified 6 years ago
#5227 closed defect
TableTest not working under Win32 again — at Initial Version
Reported by: | Rüdiger Franke | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | blocker | Milestone: | 1.13.0 |
Component: | Build Environment | Version: | |
Keywords: | Cc: | Niklas Worschech |
Description
This issue had been solved 9 months ago in #4722 and re-appears in a different form now. The example is:
model TableTest extends Modelica.Blocks.Tables.CombiTable2D( table = [0.0, 1.0, 2.0, 3.0; 1.0, 1.0, 3.0, 5.0; 2.0, 2.0, 4.0, 6.0]); annotation(uses(Modelica(version="3.2.2"))); end TableTest;
FMI export from OMEdit under Win32 raises now (Cpp runtime selected):
g++ -shared -o TableTest.dll OMCppTableTestCalcHelperMain.o -L"C:/OpenModelica1.13.0-dev-32bit//lib//omc/cpp" -Wl,--no-undefined -lOMCppSystem_static -lOMCppMath_static -lOMCppModelicaUtilities_static -lOMCppFMU_static -lOMCppNewton_static -lOMCppDgesvSolver_static -lOMCppExtensionUtilities_static -L"C:/someworkdir" "-LC:/OpenModelica1.13.0-dev-32bit//lib//omc" "-LC:/OpenModelica1.13.0-dev-32bit//lib/" "-L%APPDATA%/.openmodelica/binaries/TableTest" "-LC:/someworkdir/Resources/Library/mingw32" "-LC:/someworkdir/Resources/Library/win32" "-LC:/someworkdir/Resources/Library" -lModelicaStandardTables -lModelicaIO -lModelicaMatIO -lzlib "-L%APPDATA%/.openmodelica/binaries/Modelica" "-LC:/OpenModelica1.13.0-dev-32bit/lib/omlibrary/Modelica 3.2.2/Resources/Library/mingw32" "-LC:/OpenModelica1.13.0-dev-32bit/lib/omlibrary/Modelica 3.2.2/Resources/Library/win32" "-LC:/OpenModelica1.13.0-dev-32bit/lib/omlibrary/Modelica 3.2.2/Resources/Library" -lOMCppModelicaUtilities_static -lOMCppDgesv_static -static C:/OpenModelica1.13.0-dev-32bit//lib//omc\libModelicaMatIO.a(ModelicaMatIO.o): In function `Mat_class_type_to_hid_t': C:\dev\e\OM32bit\OMCompiler\3rdParty\ModelicaExternalC\BuildProjects\autotools/../../C-Sources/ModelicaMatIO.c:18387: undefined reference to `H5open' C:\dev\e\OM32bit\OMCompiler\3rdParty\ModelicaExternalC\BuildProjects\autotools/../../C-Sources/ModelicaMatIO.c:18387: undefined reference to `H5T_NATIVE_LLONG_g' ...
Attempting to manually add -lz -lhdf5
(as done for the simulator), yet another linker error comes up:
g++ -shared -o TableTest.dll OMCppTableTestCalcHelperMain.o -L"C:/OpenModelica1.13.0-dev-32bit//lib//omc/cpp" -Wl,--no-undefined -lOMCppSystem_static -lOMCppMath_static -lOMCppModelicaUtilities_static -lOMCppFMU_static -lOMCppNewton_static -lOMCppDgesvSolver_static -lOMCppExtensionUtilities_static -L"C:/someworkdir" "-LC:/OpenModelica1.13.0-dev-32bit//lib//omc" "-LC:/OpenModelica1.13.0-dev-32bit//lib/" "-L%APPDATA%/.openmodelica/binaries/TableTest" "-LC:/someworkdir/Resources/Library/mingw32" "-LC:/someworkdir/Resources/Library/win32" "-LC:/someworkdir/Resources/Library" -lModelicaStandardTables -lModelicaIO -lModelicaMatIO -lzlib -lhdf5 -lz "-L%APPDATA%/.openmodelica/binaries/Modelica" "-LC:/OpenModelica1.13.0-dev-32bit/lib/omlibrary/Modelica3.2.2/Resources/Library/mingw32" "-LC:/OpenModelica1.13.0-dev-32bit/lib/omlibrary/Modelica3.2.2/Resources/Library/win32" "-LC:/OpenModelica1.13.0-dev-32bit/lib/omlibrary/Modelica3.2.2/Resources/Library" -lOMCppModelicaUtilities_static -lOMCppDgesv_static -static C:/OpenModelica1.13.0-dev-32bit/tools/msys/mingw32/bin/../lib/gcc/i686-w64-mingw32/5.3.0/../../../../lib\libhdf5.a(H5Z.c.obj):(.text+0x6e4): undefined reference to `SZ_encoder_enabled' C:/OpenModelica1.13.0-dev-32bit/tools/msys/mingw32/bin/../lib/gcc/i686-w64-mingw32/5.3.0/../../../../lib\libhdf5.a(H5Zszip.c.obj):(.text+0xee): undefined reference to `SZ_BufftoBuffDecompress' C:/OpenModelica1.13.0-dev-32bit/tools/msys/mingw32/bin/../lib/gcc/i686w64-mingw32/5.3.0/../../../../lib\libhdf5.a(H5Zszip.c.obj):(.text+0x1a7): undefinedreference to `SZ_BufftoBuffCompress' collect2.exe: error: ld returned 1 exit status TableTest_FMU.makefile:93: recipe for target 'TableTest.fmu' failed make: *** [TableTest.fmu] Error 1
The additional link dependency to -lsz
cannot be fulfilled (a misconfiguration of the static libhdf5.a?).
It is generally redigulous to have that many link dependencies for such a simple Modelica model.
Note:
See TracTickets
for help on using tickets.