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

Windows build fails with Visual Studio 2019 but succeeds with Visual Studio 2017 #277

Open
gfrung4 opened this issue Dec 8, 2022 · 4 comments

Comments

@gfrung4
Copy link

gfrung4 commented Dec 8, 2022

When I pull the current master branch (commit 02bdb84) and try to build it, the build succeeds when using Visual Studio 2017, but fails with Visual Studio 2019.

This is surprising to me because it looks like your GitHub prebuild action is using Visual Studio 2019 and it succeeds.

Specifically, when I build with Visual Studio 2019 (16.11.33027.164) the build fails when building noble_winrt.cc:

noble-master\lib\win\src\notify_map.h(31,54): error C2064: term does not evaluate to a function taking 1 arguments [noble-master\build\lib\win\binding.vcxproj]
noble-master\lib\win\src\notify_map.h(32,61): error C2064: term does not evaluate to a function taking 1 arguments [noble-master\build\lib\win\binding.vcxproj]
noble-master\lib\win\src\notify_map.h(33,1): error C3536: 'serviceHash': cannot be used before it is initialized [noble-master\build\lib\win\binding.vcxproj]
noble-master\lib\win\src\notify_map.h(34,1): error C3536: 'characteristicHash': cannot be used before it is initialized [noble-master\build\lib\win\binding.vcxproj]

This error does not occur when I use Visual Studio 2017 (15.9.33027.88).

Any thoughts on why this is, and why the GitHub prebuild action succeeds even though it is using Visual Studio 2019?

This isn't a major issue, since I can just build using Visual Studio 2017, but I do wonder why 2019 fails.

@Nathan-L-Cook
Copy link

Same problem here with VS2019. It was actually working for me with VS2019 up until recently (probably something in Release 1.9.2-19).

@rickymohk
Copy link

Getting this issue. I could have use VS2017 but I am using electron-rebuild which complains about path longer than 260 characters so I have to upgrade to VS2019, now I am stuck.

@rickymohk
Copy link

So the commit fd5e2ad explicitly remove the definition and implementation of std::hash<winrt:guid> for VS2019 and after. I don't know this commit's intention but removing the condition seems make it able to build on VS2019.

@tkomde
Copy link

tkomde commented May 16, 2023

Our team found that installing Windows SDK >=22000 will pass a build with VS2019/2022.

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

No branches or pull requests

4 participants