Skip to content

Commit

Permalink
- fixed C++ MinGW FMU export on Windows (the libgcc-dll is now copied…
Browse files Browse the repository at this point in the history
… to build/bin, lapack and blas are embedded into the FMU)
  • Loading branch information
Marcus Walther committed Nov 27, 2015
1 parent fe43efb commit 36b9fbe
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Compiler/Template/CodegenFMUCpp.tpl
Expand Up @@ -697,7 +697,7 @@ case SIMCODE(modelInfo=MODELINFO(__), makefileParams=MAKEFILE_PARAMS(__), simula
let modelName = if isFMIVersion10(FMUVersion) then fileNamePrefix else dotPath(modelInfo.name)
let platformstr = match makefileParams.platform case "i386-pc-linux" then 'linux32' case "x86_64-linux" then 'linux64' else '<%makefileParams.platform%>'
let omhome = makefileParams.omhome
let platformbins = match platformstr case "win32" then '"<%omhome%>/bin/libgcc_s_dw2-1.dll"' else ''
let platformbins = match platformstr case "win32" then '"<%omhome%>/bin/libgcc_s_dw2-1.dll" "<%omhome%>/bin/lapack_win32.DLL" "<%omhome%>/bin/blas_win32.DLL"' else ''
let mkdir = match makefileParams.platform case "win32" then '"mkdir.exe"' else 'mkdir'
<<
# Makefile generated by OpenModelica
Expand Down Expand Up @@ -734,7 +734,7 @@ case SIMCODE(modelInfo=MODELINFO(__), makefileParams=MAKEFILE_PARAMS(__), simula

CPPFLAGS=$(CFLAGS)

OMCPP_LIBS=-lOMCppSystem_FMU_static -lOMCppMath_static -lOMCppExtensionUtilities_static -lOMCppModelicaUtilities_static -lOMCppFMU_static $(OMCPP_SOLVER_LIBS)
OMCPP_LIBS=-lOMCppSystem_FMU_static -lOMCppMath_static -lOMCppModelicaUtilities_static -lOMCppFMU_static $(OMCPP_SOLVER_LIBS) -lOMCppExtensionUtilities_static

MODELICA_EXTERNAL_LIBS=-lModelicaExternalC -lModelicaStandardTables -L$(LAPACK_LIBS) $(LAPACK_LIBRARIES)
LIBS=$(OMCPP_LIBS) $(MODELICA_EXTERNAL_LIBS) $(BASE_LIB)
Expand Down
1 change: 1 addition & 0 deletions Makefile.omdev.mingw
Expand Up @@ -161,6 +161,7 @@ omdev_extra_dlls: install-openturns
echo Copying needed .dlls to the $(OMBUILDDIR)/bin directory
(cp -puf $(OMDEV)/tools/mingw/bin/libintl-8.dll $(builddir_bin)/)
(cp -puf $(OMDEV)/tools/mingw/bin/libiconv-2.dll $(builddir_bin)/)
(cp -puf $(OMDEV)/tools/mingw/bin/libgcc_s_dw2-1.dll $(builddir_bin)/)
(cp -puf $(OMDEV)/lib/omniORB-4.1.6-msvc-10/bin/x86_win32/omniORB416_vc10_rt.dll $(builddir_bin)/)
(cp -puf $(OMDEV)/lib/omniORB-4.1.6-msvc-10/bin/x86_win32/omnithread34_vc10_rt.dll $(builddir_bin)/)
(cp -puf $(OMDEV)/lib/pthread/pthreadGC2.dll $(builddir_bin)/)
Expand Down
4 changes: 0 additions & 4 deletions SimulationRuntime/cpp/Include/Solver/Newton/Newton.h
Expand Up @@ -5,15 +5,11 @@

#pragma once

#include "FactoryExport.h"

#include <Core/System/IAlgLoop.h> // Interface to AlgLoo
#include <Core/Solver/IAlgLoopSolver.h> // Export function from dll
#include <Core/Solver/INonLinSolverSettings.h>
#include <Solver/Newton/NewtonSettings.h>

#include <Core/Utils/extension/logger.hpp>


/*****************************************************************************/
/**
Expand Down
4 changes: 4 additions & 0 deletions SimulationRuntime/cpp/Solver/Newton/Newton.cpp
Expand Up @@ -4,6 +4,10 @@
*/
#include <Core/ModelicaDefine.h>
#include <Core/Modelica.h>

#include <Solver/Newton/FactoryExport.h>
#include <Core/Utils/extension/logger.hpp>

#include <Solver/Newton/Newton.h>

#include <Core/Math/ILapack.h> // needed for solution of linear system with Lapack
Expand Down

0 comments on commit 36b9fbe

Please sign in to comment.