Skip to content

Commit

Permalink
Link to static versions of sundails for FMUs. (#8377)
Browse files Browse the repository at this point in the history
  - We build both static and shared versions of sundials libs.
    The shared versions are needed for the cpp runtime.

    If we are generating static FMUs with CVODE as a solver we
    link to `cvode` and `nvecserial`. Make sure we link to the static versions
    of this libraries.
  • Loading branch information
mahge committed Jan 4, 2022
1 parent 6c3a4e4 commit f08a531
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion OMCompiler/Compiler/Template/CodegenFMU.tpl
Expand Up @@ -1278,7 +1278,7 @@ template fmuMakefile(String target, SimCode simCode, String FMUVersion, list<Str
endif
ifneq ($(NEED_SUNDIALS),)
FMISUNDIALSFILES=<%sundialsObjectFiles ; separator = " "%>
LDFLAGS+=-lsundials_cvode -lsundials_nvecserial
LDFLAGS+=-Wl,-Bstatic -lsundials_cvode -lsundials_nvecserial -Wl,-Bdynamic
endif
>>

Expand Down

0 comments on commit f08a531

Please sign in to comment.