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

Too many errors when compiling with clang and cpp #9

Closed
neroist opened this issue Apr 17, 2024 · 0 comments
Closed

Too many errors when compiling with clang and cpp #9

neroist opened this issue Apr 17, 2024 · 0 comments

Comments

@neroist
Copy link
Owner

neroist commented Apr 17, 2024

Example:

C:\Users\xx\OneDrive\Documents\uing\uing\libui\windows\drawtext.cpp:279:36: warning: exception specification of
      overriding function is more lax than base version [-Wmicrosoft-exception-spec]
  279 |         virtual HRESULT STDMETHODCALLTYPE GetCurrentTransform(void *clientDrawingContext, DWRITE_MATRIX *transform)
      |                                           ^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\um\dwrite.h:3607:15: note: overridden virtual function is
      here
 3607 |     STDMETHOD(GetCurrentTransform)(
      |               ^
...
7 warnings generated.

^ but x100

fix

This does it:

...
else:
  ...
  when defined(windows):
    ...
    when defined(clang) and defined(cpp):
      {.passC: "-D_CRT_SECURE_NO_WARNINGS".}
      {.passC: "-Wno-int-to-pointer-cast".}
      {.passC: "-Wno-microsoft-exception-spec".}
@neroist neroist closed this as completed Apr 17, 2024
neroist added a commit that referenced this issue Apr 17, 2024
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

1 participant