Skip to content

Conversation

@Meiguro
Copy link

@Meiguro Meiguro commented Jan 26, 2026

Add Windows-specific nvcc flags to fix the build:

  • -Xcompiler /Zc:preprocessor: Enables MSVC's standards-conformant C/C++ preprocessor, which correctly handles complex macro patterns in Windows SDK headers like oaidl.h.

  • -DNOGDI: Excludes GDI definitions from Windows headers, preventing wingdi.h's CC_MSCPASCAL macro from conflicting with the enum of the same name in oaidl.h.

Add Windows-specific nvcc flags to fix the build:

- `-Xcompiler /Zc:preprocessor`: Enables MSVC's standards-conformant
  C/C++ preprocessor, which correctly handles complex macro patterns
  in Windows SDK headers like oaidl.h.

- `-DNOGDI`: Excludes GDI definitions from Windows headers, preventing
  wingdi.h's CC_MSCPASCAL macro from conflicting with the enum of the
  same name in oaidl.h.
@Meiguro
Copy link
Author

Meiguro commented Jan 26, 2026

This is what allowed compilation on my machine. Could use someone else to double check if this is necessary. I'm also willing to try any other suggestions in case this patch isn't satisfactory.

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

Successfully merging this pull request may close these issues.

1 participant