Skip to content

Commit 22aba21

Browse files
committed
- Try -rdynamic instead of -ldl.
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@11903 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent 74ecd44 commit 22aba21

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Compiler/susan_codegen/SimCode/CodegenC.tpl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2136,7 +2136,8 @@ case SIMCODE(modelInfo=MODELINFO(__), makefileParams=MAKEFILE_PARAMS(__), simula
21362136
CFLAGS_BASED_ON_INIT_FILE=<%extraCflags%>
21372137
CFLAGS=$(CFLAGS_BASED_ON_INIT_FILE) <%makefileParams.cflags%> <%match sopt case SOME(s as SIMULATION_SETTINGS(__)) then s.cflags /* From the simulate() command */%>
21382138
CPPFLAGS=-I"<%makefileParams.omhome%>/include/omc" -I. <%dirExtra%> <%makefileParams.includes ; separator=" "%>
2139-
LDFLAGS=-L"<%makefileParams.omhome%>/lib/omc" <% if boolOr(acceptMetaModelicaGrammar(), Flags.isSet(Flags.GEN_DEBUG_SYMBOLS)) then "-Wl,-whole-archive"%> -lSimulationRuntimeC <% if stringEq(makefileParams.platform, "win32") then "" else "-ldl"%> <% if boolOr(acceptMetaModelicaGrammar(), Flags.isSet(Flags.GEN_DEBUG_SYMBOLS)) then "-Wl,-no-whole-archive"%> <%ParModelicaLibs%> <%makefileParams.ldflags%>
2139+
LIBSIMULATIONRUNTIMEC=<% if boolOr(acceptMetaModelicaGrammar(), Flags.isSet(Flags.GEN_DEBUG_SYMBOLS)) then "-rdynamic -Wl,-whole-archive "%>-lSimulationRuntimeC<% if boolOr(acceptMetaModelicaGrammar(), Flags.isSet(Flags.GEN_DEBUG_SYMBOLS)) then " -Wl,-no-whole-archive"%>
2140+
LDFLAGS=-L"<%makefileParams.omhome%>/lib/omc" $(LIBSIMULATIONRUNTIMEC) <%ParModelicaLibs%> <%makefileParams.ldflags%>
21402141
SENDDATALIBS=<%makefileParams.senddatalibs%>
21412142
SUNDIALSLIBS=-lsundials_kinsol -lsundials_nvecserial <% if stringEq(makefileParams.platform, "win32") then "-llapack-mingw" else "-llapack"%>
21422143
PERL=perl

0 commit comments

Comments
 (0)