Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed building with VS2019 #246

Merged
merged 1 commit into from
Oct 17, 2021
Merged

Fixed building with VS2019 #246

merged 1 commit into from
Oct 17, 2021

Conversation

hasherezade
Copy link
Contributor

While trying to build with Visual Studio 2019, the following errors occur:

alkhaser_errors

The proposed patch makes the build successful:

alkhaser_build_ok

@hasherezade hasherezade changed the title Bugfix: fixed building with VS2019 Fixed building with VS2019 Oct 15, 2021
@ayoubfaouzi
Copy link
Owner

ayoubfaouzi commented Oct 16, 2021

Hey @hasherezade

Interesting, I can't reproduce it on my end, I have VS2019 (Community Edition) and it compiles without issues.

The VS project itself is made with VS 2017 but when you open it for the first time (depending on what you have on your machine) you get that dialog that asks you to migrate the project:

image

I myself have VS2019 which is backward compatible with previous VS back to 2010, but atm as you can see, we have the WindowsTargetPlatformVersion set to the sdk version 10.0.18362.0 and the PlatformToolset set to v141. On my setup, I the platformtoolset is set v141, and I don't get compilation errors. That's why it is not failing on my side :)

<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v141</PlatformToolset>

Probably one good thing to do is to set the WindowsTargetPlatformVersion to 10.0 which means use the latest Windows 10 SDK. And we can move the platform toolset to v142, that's probably most of what the people has now.

Cheers.

@ayoubfaouzi
Copy link
Owner

ayoubfaouzi commented Oct 16, 2021

Wait :) I just got the same issue as you when making a fresh clone. If we use the platform toolset v142, it produces that issue. OK all good, merging your PR.

Thanks you !

@ayoubfaouzi ayoubfaouzi merged commit d3efb3f into ayoubfaouzi:master Oct 17, 2021
@hasherezade hasherezade deleted the vs2019_fix branch October 17, 2021 09:02
fengjixuchui added a commit to fengjixuchui/al-khaser that referenced this pull request Oct 19, 2021
Merge pull request ayoubfaouzi#246 from hasherezade/vs2019_fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants