weixin_39605463
weixin_39605463
2020-12-09 02:24

serial.h THROW macro conflicts with Windows ATL THROW macro

Under Windows, if I include serial.h in my cpp file which includes ATL headers then I get following warning: warning C4005: 'THROW': macro redefinition 1>c:\program files (x86)\microsoft visual studio\2017\professional\vc\tools\msvc\14.16.27023\atlmfc\include\afx.h(858): note: see previous definition of 'THROW' suggestions: 1 Rename THROW macro to e.g. SERIAL_THROW or similar. 2 Move THROW macro from serial.h to one of the impl files. In fact there's no THROW in serial.h, only in impl files.

该提问来源于开源项目:crayzeewulf/libserial

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

4条回答