MethanePowered / MethaneKit

🎲 Modern 3D graphics made simple with C++17 cross-platform framework and rendering abstraction API on top of DirectX 12, Metal & Vulkan
Apache License 2.0
880 stars 54 forks source link

build error in Windows #87

Closed navono closed 3 years ago

navono commented 3 years ago

Describe the bug

  1. with Debug mode, cannot find Windows SDK
  2. after fix Windows SDK issue, it will generate error C2220 error in third libraries

Steps To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior Compile and run.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

How to fix Issue 1: FindWindowsSDK.cmake -> _winsdk_win10vers, add current Windows SDK version bumber Issue 2: In project root CMakeLists.txt line 121, change /WX to /WX- or just delete /WX

egorodet commented 3 years ago

Thanks for reporting and investigating the problem! Seems like you already have a workaround. I will look into fixing it next week.

egorodet commented 3 years ago

Hello @navono, I was not able to reproduce the problem on the same version of Windows and SDK. Could you provide more details about how you run the build and attach full build log? Also please try to build with Build\Windows\Build.bat and check if it works for you (generated solution should include both Release and Debug configurations).

egorodet commented 3 years ago

Hold on! I reproduced something similar on clean Windows setup.

egorodet commented 3 years ago

CMake generation issue related to finding of the new Windows SDK version is now fixed.

@navono, I did not reproduce any compilation errors in MSVC build configurations with the latest Windows SDK. Please note that Clang build configurations are currently not supported (they are added for experimental purposes). If you still experience any compilation errors or warnings, please open separate issue with detailed description of how you build the code (preferrably with command line examples) and attach full build logs, so that it would be possible to reproduce the issue.