kiyolee / libxslt-win-build

libxslt Windows build with Visual Studio.
Other
17 stars 5 forks source link

Most of your XSLT projects are missing the UniversalCRT include and Library directories #2

Open dprophet opened 5 years ago

dprophet commented 5 years ago

Microsoft changed the Windows Kits a while ago. They factored out the C runtime pieces into its own area.

All of your XSLT projects are missing the $(UniversalCRT_IncludePath) and $(UniversalCRT_LibraryPath_x86)

I am working with VS2017. I can certainly give you a pull request for these projects if you want but I certainly cant give it for all of your supported VS versions.

dprophet commented 5 years ago

I have a potential solution but I dont like it.

I modified the Microsoft.Cpp.Win32.user.props file and added the below so I could globally repoint all of your solutions at once.

  <PropertyGroup Condition="$(PlatformToolset) == 'v141' AND '$(Configuration)|$(Platform)'=='Debug|Win32'">
    <WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>
    <IncludePath>C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\ucrt;$(IncludePath)</IncludePath>
    <LibraryPath>C:\Program Files (x86)\Windows Kits\10\Lib\10.0.14393.0\ucrt\x86;$(LibraryPath)</LibraryPath>
  </PropertyGroup>
  <PropertyGroup Condition="$(PlatformToolset) == 'v141' AND '$(Configuration)|$(Platform)'=='Release|Win32'">
    <WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>
    <IncludePath>C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\ucrt;$(IncludePath)</IncludePath>
    <LibraryPath>C:\Program Files (x86)\Windows Kits\10\Lib\10.0.14393.0\ucrt\x86;$(LibraryPath)</LibraryPath>
  </PropertyGroup>
kiyolee commented 5 years ago

I intentionally keep Windows SDK Version as 8.1 (as default) for VS2017. If you don't have Windows SDK 8.1 installed, you will encounter the compiling and linking problems that you have. Only until lately, I notice a default install of VS2017 won't install Windows SDK 8.1. The simplier solution is to change the Windows SDK Version to 10 in your repository. Or alternatively you may install Windows SDK 8.1. I am considering to change Windows SDK Version to 10 for VS2017 as Windows 10 is certainly more popular these days and most people (I guess) won't install Windows SDK 8.1 when installing VS2017. Btw, notice that VS2019 has already changed the default to 10.

dprophet commented 5 years ago

Only until lately, I notice a default install of VS2017 won't install Windows SDK 8.1.

Correct, VS2017 Enterprise didnt install SDK 8.1 (or at least not the full SDK because the C Runtime wasnt installed). The Windows Kits/8.1 directories was installed but there was no C Runtime.