Skip to content

GenerateExportHeader: Fix Clang support on Windows

When using Clang with Visual Studio, the GenerateExportHeader function generates the DEPRECATED definition __attribute__ ((__deprecated__)), because Clang can compile such instruction. However, if a user wants to compile the library with this generated header with MSVC, the declaration is not valid.

We suggest to always use the DEPRECATED definition __declspec(deprecated) on Windows, which is valid for both Clang and MSVC.

Edited by cdammanintopix

Merge request reports