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

C++/CX builds do not work with latest UWP version #984

Open
JohnnyWestlake opened this issue Feb 12, 2025 · 2 comments
Open

C++/CX builds do not work with latest UWP version #984

JohnnyWestlake opened this issue Feb 12, 2025 · 2 comments

Comments

@JohnnyWestlake
Copy link

JohnnyWestlake commented Feb 12, 2025

After updating from 1.26.0 to 1.28.2, my C++/CX project no longer builds, hitting the following errors instead: :')

Win2D.uwp.1.28.2\Include\Microsoft.Graphics.Canvas.native.h(252,34): error C2065: 'ID2D1Device1': undeclared identifier
Win2D.uwp.1.28.2\Include\Microsoft.Graphics.Canvas.native.h(252,48): error C2065: 'device': undeclared identifier
Win2D.uwp.1.28.2\Include\Microsoft.Graphics.Canvas.native.h(252,66): error C2065: 'resource': undeclared identifier
Win2D.uwp.1.28.2\Include\Microsoft.Graphics.Canvas.native.h(252,56): error C2275: 'IUnknown': expected an expression instead of a type
Win2D.uwp.1.28.2\Include\Microsoft.Graphics.Canvas.native.h(252,22): error C2365: 'Microsoft::Graphics::Canvas::GetOrCreate': redefinition; previous definition was 'function'
Win2D.uwp.1.28.2\Include\Microsoft.Graphics.Canvas.native.h(253,13): error C2447: '{': missing function header (old-style formal list?)
Win2D.uwp.1.28.2\Include\Microsoft.Graphics.Canvas.native.h(259,34): error C2065: 'ID2D1Device1': undeclared identifier
Win2D.uwp.1.28.2\Include\Microsoft.Graphics.Canvas.native.h(259,48): error C2065: 'device': undeclared identifier
Win2D.uwp.1.28.2\Include\Microsoft.Graphics.Canvas.native.h(259,66): error C2065: 'resource': undeclared identifier
Win2D.uwp.1.28.2\Include\Microsoft.Graphics.Canvas.native.h(259,56): error C2275: 'IUnknown': expected an expression instead of a type
Win2D.uwp.1.28.2\Include\Microsoft.Graphics.Canvas.native.h(259,76): error C2062: type 'float' unexpected
Win2D.uwp.1.28.2\Include\Microsoft.Graphics.Canvas.native.h(260,13): error C2143: syntax error: missing ';' before '{'
Win2D.uwp.1.28.2\Include\Microsoft.Graphics.Canvas.native.h(260,13): error C2447: '{': missing function header (old-style formal list?)

(UWP, VS 17.13 Preview 5)

@getrou
Copy link
Member

getrou commented Feb 12, 2025

Hm, that is concerning, we'll definitely take a look at this. @Sergio0694 FYI looks like an issue with the native header.

In the meantime, as a workaround, try including d2d1_2.h before including microsoft.graphics.canvas.native.h

@JohnnyWestlake
Copy link
Author

Hm, that is concerning, we'll definitely take a look at this. @Sergio0694 FYI looks like an issue with the native header.

In the meantime, as a workaround, try including d2d1_2.h before including microsoft.graphics.canvas.native.h

That does allow it successfully build

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

2 participants