cppast icon indicating copy to clipboard operation
cppast copied to clipboard

MSVC Compilation error

Open crackedmind opened this issue 6 years ago • 4 comments

  • cppast version: 55221f1536a1f21c3f0b0b4dbb28344185ec655c
  • parser: libclang_parser
  • clang version: 8.0

Can't compile cppast using MS VC++ compiler versions: 19.16, 19.21, 19.22.

Input flags: cmake -B build -S. -GNinja -DCMAKE_BUILD_TYPE=Release -DLIBCLANG_LIBRARY=F:\llvm8\lib\libclang.lib Output:

\cppast\external\type_safe\external\debug_assert\debug_assert.hpp(245) : error C2220: warning treated as error - no 'object' file generated
\cppast\external\type_safe\external\debug_assert\debug_assert.hpp(245) : warning C4702: unreachable code

It's not really related to cppast, but flag /WX affected cppast compilation.

crackedmind avatar Aug 02 '19 19:08 crackedmind

Same problem here. CMAKE_BUILD_TYPE Debug seems to work for me but the others fail.

Silveryard avatar Aug 19 '19 10:08 Silveryard

Had the same problem recently, it's a speculation, but I think it is due to a lack of -DDEBUG_ASSERT_DISABLE in release builds. Hope that's useful.

Epixu avatar Aug 19 '19 10:08 Epixu

Same problem

dererror33 avatar Sep 04 '19 04:09 dererror33

Fixed with /WX- options

dererror33 avatar Sep 04 '19 04:09 dererror33