cpprestsdk icon indicating copy to clipboard operation
cpprestsdk copied to clipboard

workaround clang 14 __has_declspec_attribute restriction

Open liam-x opened this issue 3 years ago • 0 comments

fix #1710

clang 14 impose a new restriction on __has_declspec_attribute, the argument can not be empty. https://github.com/llvm/llvm-project/issues/53269

cppresetsdk cpprest_compat.h translate dllimport to empty which cause compilation failure on clang 14.

A workaround by removing define dllimport and add no-unknown-attributes flag to suppress the compilation warning from clang on macOS and Linux.

liam-x avatar Oct 07 '22 21:10 liam-x