Skip to content

Commit

Permalink
Link model specific extra libs with msvc as well
Browse files Browse the repository at this point in the history
  • Loading branch information
rfranke committed Apr 14, 2016
1 parent 12f928e commit e7cbe78
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Compiler/Template/CodegenFMUCpp.tpl
Expand Up @@ -643,9 +643,7 @@ case "msvc" then
match simCode
case SIMCODE(modelInfo=MODELINFO(__), makefileParams=MAKEFILE_PARAMS(__), simulationSettingsOpt = sopt) then
let dirExtra = if modelInfo.directory then '-L"<%modelInfo.directory%>"' //else ""
let libsStr = (makefileParams.libs |> lib => lib ;separator=" ")
let libsPos1 = if not dirExtra then libsStr //else ""
let libsPos2 = if dirExtra then libsStr // else ""
let libsExtra = (makefileParams.libs |> lib => lib ;separator=" ")
let ParModelicaLibs = if acceptParModelicaGrammar() then '-lOMOCLRuntime -lOpenCL' // else ""
let extraCflags = match sopt case SOME(s as SIMULATION_SETTINGS(__)) then
match s.method case "dassljac" then "-D_OMC_JACOBIAN "
Expand Down Expand Up @@ -678,7 +676,8 @@ case SIMCODE(modelInfo=MODELINFO(__), makefileParams=MAKEFILE_PARAMS(__), simula
# /link - [linker options and libraries]
# /LIBPATH: - Directories where libs can be found
OMCPP_SOLVER_LIBS=OMCppNewton_static.lib OMCppDgesv_static.lib
LDFLAGS=/link /DLL /NOENTRY /LIBPATH:"<%makefileParams.omhome%>/lib/omc/cpp/msvc" /LIBPATH:"<%makefileParams.omhome%>/bin" OMCppSystem_static.lib OMCppMath_static.lib OMCppModelicaUtilities_static.lib OMCppExtensionUtilities_static.lib OMCppFMU_static.lib $(OMCPP_SOLVER_LIBS) ModelicaExternalC.lib ModelicaStandardTables.lib
EXTRA_LIBS=<%dirExtra%> <%libsExtra%>
LDFLAGS=/link /DLL /NOENTRY /LIBPATH:"<%makefileParams.omhome%>/lib/omc/cpp/msvc" /LIBPATH:"<%makefileParams.omhome%>/bin" OMCppSystem_static.lib OMCppMath_static.lib OMCppExtensionUtilities_static.lib OMCppFMU_static.lib $(OMCPP_SOLVER_LIBS) ModelicaExternalC.lib ModelicaStandardTables.lib OMCppModelicaUtilities_static.lib $(EXTRA_LIBS)
PLATFORM="<%makefileParams.platform%>"

MODEL_NAME=<%modelName%>
Expand Down

0 comments on commit e7cbe78

Please sign in to comment.