Opened 5 years ago
Closed 5 years ago
#5877 closed defect (fixed)
FMU Built with CPP under Linux
Reported by: | Owned by: | Lennart Ochel | |
---|---|---|---|
Priority: | high | Milestone: | Future |
Component: | FMI | Version: | v1.16.0-dev |
Keywords: | CPP, Linux, FMI | Cc: | Martin Sjölund |
Description
Hey,
we tried to build an FMU compiled in cpp under the OpenmodelicaVM (and on Ubuntu) delivered on the webpage using omc fmu.mos
Basically we are missing two folders:
- /usr/lib/x86_64-linux-gnu/omc/cpp
- /usr/include/omc/cpp
It works on windows and copying the include
folder from windows solves compilation errors, but leaving us with the linker errors.
DETAILS
with fmu.mos:
loadModel( grid); getErrorString(); setCommandLineOptions("-d=newInst"); getErrorString(); setCommandLineOptions("-d=initialization"); getErrorString(); setCommandLineOptions("--simCodeTarget=Cpp"); getErrorString(); setCommandLineOptions("-d=-disableDirectionalDerivatives"); getErrorString(); translateModelFMU(grid.network); getErrorString();
/usr/bin/../include/omc/cpp/FMU2/FMU2Wrapper.cpp:93:11: warning: 6 enumeration values not handled in switch: 'LC_INIT', 'LC_LS', 'LC_SOLVER'... [-Wswitch] switch (cat) { ^ 1 warning generated. clang++ -shared -o grid_network.so OMCppgrid_networkCalcHelperMain.o -L"/usr/bin/../lib/x86_64-linux-gnu/omc/cpp" -Wl,--no-undefined -lOMCppSystem_static -lOMCppMath_static -lOMCppModelicaUtilities_static -lOMCppFMU_static -lOMCppNewton_static -lOMCppDgesvSolver_static -lOMCppSolver_static -lOMCppExtensionUtilities_static -L"/usr/lib/omlibrary" -lOMCppModelicaUtilities_static -lOMCppDgesv_static /usr/bin/ld: -lOMCppSystem_static kann nicht gefunden werden /usr/bin/ld: -lOMCppMath_static kann nicht gefunden werden /usr/bin/ld: -lOMCppModelicaUtilities_static kann nicht gefunden werden /usr/bin/ld: -lOMCppFMU_static kann nicht gefunden werden /usr/bin/ld: -lOMCppNewton_static kann nicht gefunden werden /usr/bin/ld: -lOMCppDgesvSolver_static kann nicht gefunden werden /usr/bin/ld: -lOMCppSolver_static kann nicht gefunden werden /usr/bin/ld: -lOMCppExtensionUtilities_static kann nicht gefunden werden /usr/bin/ld: -lOMCppModelicaUtilities_static kann nicht gefunden werden /usr/bin/ld: -lOMCppDgesv_static kann nicht gefunden werden clang: error: linker command failed with exit code 1 (use -v to see invocation) grid_network_FMU.makefile:93: recipe for target 'grid.network.fmu' failed make: *** [grid.network.fmu] Error 1
Attachments (1)
Change History (2)
by , 5 years ago
comment:1 by , 5 years ago
Cc: | added |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Strange, I guess it doesn't install the cpp runtime?
Adding apt-get install libomccpp
should fix it.
I now added that when installing omc in the VM.
Let's see on the next build if you will have that.
You can also do it in the current VM you have to install the CPP runtime if you want:
sudo apt-get install libomccpp
grid.network should be exported as FMU