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

Can't compile in C (C++ works) #5

Closed
aleksazr opened this issue Apr 15, 2022 · 3 comments
Closed

Can't compile in C (C++ works) #5

aleksazr opened this issue Apr 15, 2022 · 3 comments

Comments

@aleksazr
Copy link

Hello,

can you tell me which SDK version are you using, where did you get it...

I'm using Visual Studio Community 2022 and can't compile dwrite.h in C mode.

An example line from dwrite.h

interface DWRITE_DECLARE_INTERFACE("739d886a-cef5-47dc-8769-1a8b41bebbb0") IDWriteFontFile : public IUnknown

preprocessed to C++

struct __declspec(uuid("739d886a-cef5-47dc-8769-1a8b41bebbb0")) __declspec(novtable) IDWriteFontFile : public IUnknown

preprocessed to C

struct   IDWriteFontFile : public IUnknown

and the part " : public IUnknown" gets in the way.

I have zero experience with C++, but it looks to me as this is a Microsoft bug, they simply forgot about C.
But then, how do you compile it?

@makuke1234
Copy link
Owner

I agreee on the point being simply a Microsoft bug. As you may see from my makefile I am using GNU C Compiler & GNU C++ Compiler for the wrapper. I am using the MSYS2 platform https://www.msys2.org/ that allows me to build native Windows applications with MinGW port of GCC & G++.

@aleksazr
Copy link
Author

aleksazr commented Apr 16, 2022

Thank you. Maybe you should add that info to the readme.

@makuke1234
Copy link
Owner

Thank you for requesting additional information! All included in the readme now.

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