From: Reino Ruusu Date: Thu, 13 Sep 2018 15:53:32 +0000 (+0300) Subject: Fixed some issues in native code and build configs. X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=64c67827aafeb7a93e1ec1649393fa2c991b181f;hp=d6e8999a4b5c9e57d7b22b2f7a703c2d3549eb8c;p=simantics%2Ffmil.git Fixed some issues in native code and build configs. gitlab #6 Update to VC++ v141 (2017). Change-Id: I3e16a10fba1a4298a486206810ebbf1497cb3af0 --- diff --git a/org.simantics.fmil.core/native/FMUSimulator/FMUSimulator.vcxproj b/org.simantics.fmil.core/native/FMUSimulator/FMUSimulator.vcxproj index ac623b2..f89c55a 100644 --- a/org.simantics.fmil.core/native/FMUSimulator/FMUSimulator.vcxproj +++ b/org.simantics.fmil.core/native/FMUSimulator/FMUSimulator.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -22,33 +22,34 @@ {9838038D-09A3-43A5-AB97-B5B5C763DF43} Win32Proj FMUSimulator + 10.0.17134.0 DynamicLibrary true NotSet - v110 + v141 DynamicLibrary true NotSet - v110 + v141 DynamicLibrary false false NotSet - v110 + v141 DynamicLibrary false false NotSet - v110 + v141 @@ -97,11 +98,12 @@ Disabled WIN32;_DEBUG;_WINDOWS;_USRDLL;FMUSIMULATOR_EXPORTS;%(PreprocessorDefinitions) MultiThreadedDebug + include\win32 Windows true - $(OutDir)zlibwapi.lib;$(OutDir)miniunz.lib;fmilib_shared.lib;%(AdditionalDependencies) + DEBUG_fmilib_shared32.lib;%(AdditionalDependencies) @@ -111,11 +113,12 @@ Disabled WIN32;_DEBUG;_WINDOWS;_USRDLL;FMUSIMULATOR_EXPORTS;%(PreprocessorDefinitions) MultiThreadedDebug + include\win32 Windows true - %(AdditionalDependencies) + DEBUG_fmilib_shared64.lib;%(AdditionalDependencies) @@ -128,8 +131,7 @@ false WIN32;NDEBUG;_WINDOWS;_USRDLL;FMUSIMULATOR_EXPORTS;%(PreprocessorDefinitions) MultiThreaded - - + include\win32 Windows @@ -149,8 +151,7 @@ false WIN32;NDEBUG;_WINDOWS;_USRDLL;FMUSIMULATOR_EXPORTS;%(PreprocessorDefinitions) MultiThreaded - - + include\win32 Windows diff --git a/org.simantics.fmil.core/native/FMUSimulator/src/fmu_control.cpp b/org.simantics.fmil.core/native/FMUSimulator/src/fmu_control.cpp index bb8e076..13272f1 100644 --- a/org.simantics.fmil.core/native/FMUSimulator/src/fmu_control.cpp +++ b/org.simantics.fmil.core/native/FMUSimulator/src/fmu_control.cpp @@ -486,9 +486,9 @@ JNIEXPORT jint JNICALL Java_org_simantics_fmil_core_FMIL_instantiateSimulation_1 FMI1 &fmi = fmus[id]; if (fmi.version == 1) { - returnValue = FMI1_CS_INSTANTIATE(fmi.fmu, instanceName, &error); + returnValue = FMI1_CS_INSTANTIATE(fmi.fmu, instanceName.c_str(), &error); } else if (fmi.version == 2) { - returnValue = FMI2_CS_INSTANTIATE(fmi.fmu, instanceName, &error); + returnValue = FMI2_CS_INSTANTIATE(fmi.fmu, instanceName.c_str(), &error); } if(returnValue != 0) { string message = "No FMU loaded: "; diff --git a/org.simantics.fmil.win32/libraries/Debug/FMUSimulator.dll b/org.simantics.fmil.win32/libraries/Debug/FMUSimulator.dll index 5682053..389caa2 100644 Binary files a/org.simantics.fmil.win32/libraries/Debug/FMUSimulator.dll and b/org.simantics.fmil.win32/libraries/Debug/FMUSimulator.dll differ diff --git a/org.simantics.fmil.win32/libraries/FMUSimulator.dll b/org.simantics.fmil.win32/libraries/FMUSimulator.dll index f702ac6..7d1b715 100644 Binary files a/org.simantics.fmil.win32/libraries/FMUSimulator.dll and b/org.simantics.fmil.win32/libraries/FMUSimulator.dll differ diff --git a/org.simantics.fmil.win64/libraries/Debug/FMUSimulator.dll b/org.simantics.fmil.win64/libraries/Debug/FMUSimulator.dll index 6ff8990..09df102 100644 Binary files a/org.simantics.fmil.win64/libraries/Debug/FMUSimulator.dll and b/org.simantics.fmil.win64/libraries/Debug/FMUSimulator.dll differ diff --git a/org.simantics.fmil.win64/libraries/FMUSimulator.dll b/org.simantics.fmil.win64/libraries/FMUSimulator.dll index b4e27a9..e30b3f5 100644 Binary files a/org.simantics.fmil.win64/libraries/FMUSimulator.dll and b/org.simantics.fmil.win64/libraries/FMUSimulator.dll differ