]> gerrit.simantics Code Review - simantics/fmil.git/commitdiff
Fixed some issues in native code and build configs. 79/2179/2
authorReino Ruusu <reino.ruusu@semantum.fi>
Thu, 13 Sep 2018 15:53:32 +0000 (18:53 +0300)
committerReino Ruusu <reino.ruusu@semantum.fi>
Fri, 14 Sep 2018 10:59:04 +0000 (13:59 +0300)
gitlab #6

Update to VC++ v141 (2017).

Change-Id: I3e16a10fba1a4298a486206810ebbf1497cb3af0

org.simantics.fmil.core/native/FMUSimulator/FMUSimulator.vcxproj
org.simantics.fmil.core/native/FMUSimulator/src/fmu_control.cpp
org.simantics.fmil.win32/libraries/Debug/FMUSimulator.dll
org.simantics.fmil.win32/libraries/FMUSimulator.dll
org.simantics.fmil.win64/libraries/Debug/FMUSimulator.dll
org.simantics.fmil.win64/libraries/FMUSimulator.dll

index ac623b2fecd3e2bbe7495fdca665aee0d1a51242..f89c55ab6cc9d7800f212b2f7786875fb25a3e17 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <ItemGroup Label="ProjectConfigurations">\r
     <ProjectConfiguration Include="Debug|Win32">\r
       <Configuration>Debug</Configuration>\r
     <ProjectGuid>{9838038D-09A3-43A5-AB97-B5B5C763DF43}</ProjectGuid>\r
     <Keyword>Win32Proj</Keyword>\r
     <RootNamespace>FMUSimulator</RootNamespace>\r
+    <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
     <ConfigurationType>DynamicLibrary</ConfigurationType>\r
     <UseDebugLibraries>true</UseDebugLibraries>\r
     <CharacterSet>NotSet</CharacterSet>\r
-    <PlatformToolset>v110</PlatformToolset>\r
+    <PlatformToolset>v141</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
     <ConfigurationType>DynamicLibrary</ConfigurationType>\r
     <UseDebugLibraries>true</UseDebugLibraries>\r
     <CharacterSet>NotSet</CharacterSet>\r
-    <PlatformToolset>v110</PlatformToolset>\r
+    <PlatformToolset>v141</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
     <ConfigurationType>DynamicLibrary</ConfigurationType>\r
     <UseDebugLibraries>false</UseDebugLibraries>\r
     <WholeProgramOptimization>false</WholeProgramOptimization>\r
     <CharacterSet>NotSet</CharacterSet>\r
-    <PlatformToolset>v110</PlatformToolset>\r
+    <PlatformToolset>v141</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
     <ConfigurationType>DynamicLibrary</ConfigurationType>\r
     <UseDebugLibraries>false</UseDebugLibraries>\r
     <WholeProgramOptimization>false</WholeProgramOptimization>\r
     <CharacterSet>NotSet</CharacterSet>\r
-    <PlatformToolset>v110</PlatformToolset>\r
+    <PlatformToolset>v141</PlatformToolset>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
   <ImportGroup Label="ExtensionSettings">\r
       <Optimization>Disabled</Optimization>\r
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;FMUSIMULATOR_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
+      <AdditionalIncludeDirectories>include\win32</AdditionalIncludeDirectories>\r
     </ClCompile>\r
     <Link>\r
       <SubSystem>Windows</SubSystem>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <AdditionalDependencies>$(OutDir)zlibwapi.lib;$(OutDir)miniunz.lib;fmilib_shared.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalDependencies>DEBUG_fmilib_shared32.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
     </Link>\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
       <Optimization>Disabled</Optimization>\r
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;FMUSIMULATOR_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
+      <AdditionalIncludeDirectories>include\win32</AdditionalIncludeDirectories>\r
     </ClCompile>\r
     <Link>\r
       <SubSystem>Windows</SubSystem>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalDependencies>DEBUG_fmilib_shared64.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
     </Link>\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
       <IntrinsicFunctions>false</IntrinsicFunctions>\r
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;FMUSIMULATOR_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
-      <AdditionalIncludeDirectories>\r
-      </AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>include\win32</AdditionalIncludeDirectories>\r
     </ClCompile>\r
     <Link>\r
       <SubSystem>Windows</SubSystem>\r
       <IntrinsicFunctions>false</IntrinsicFunctions>\r
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;FMUSIMULATOR_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
-      <AdditionalIncludeDirectories>\r
-      </AdditionalIncludeDirectories>\r
+      <AdditionalIncludeDirectories>include\win32</AdditionalIncludeDirectories>\r
     </ClCompile>\r
     <Link>\r
       <SubSystem>Windows</SubSystem>\r
index bb8e0762d041dee5d821784ab570b246a716b5d6..13272f1ac3657965abde7a1cb7c3d58e4c2eb433 100644 (file)
@@ -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: ";
index 5682053cfcfb786edb7622d9867079119521f296..389caa217979080a4943d0115415a37f461da164 100644 (file)
Binary files a/org.simantics.fmil.win32/libraries/Debug/FMUSimulator.dll and b/org.simantics.fmil.win32/libraries/Debug/FMUSimulator.dll differ
index f702ac6cb764940082d2d3efa6bcc6b7836d123a..7d1b7155c4c90ed3262c9ba0ce614cd8c27ab611 100644 (file)
Binary files a/org.simantics.fmil.win32/libraries/FMUSimulator.dll and b/org.simantics.fmil.win32/libraries/FMUSimulator.dll differ
index 6ff899070a9d253a580ea2f201a5f261fc39aa43..09df102afe51a78bb8b1aefe534287e1dd3f527c 100644 (file)
Binary files a/org.simantics.fmil.win64/libraries/Debug/FMUSimulator.dll and b/org.simantics.fmil.win64/libraries/Debug/FMUSimulator.dll differ
index b4e27a91b30f054f9f14c10d3cfe924b4bd8d551..e30b3f5038b5333d1fd95c703fda8ce2aeb3912f 100644 (file)
Binary files a/org.simantics.fmil.win64/libraries/FMUSimulator.dll and b/org.simantics.fmil.win64/libraries/FMUSimulator.dll differ