PCH Warning: header stop cannot be in a macro or #if block - Visual C++ 2010 Express SP1

前端 未结 11 556
不知归路
不知归路 2020-12-07 23:53

This is pasted from a website, which presumably was working. I did some googling and found that the issue I have now is a result of Visual C++ 2010 SP1, which I downloaded t

11条回答
  •  抹茶落季
    2020-12-08 00:25

    I use Visual Studio to edit Linux projects. For me, the issue was present when I include string.h in my precompiled header file. It was caused by lines that have an __asm statement, for example:

    __THROW __asm ("memchr") __attribute_pure__ __nonnull ((1));
    

    The solution was to define the following macro under Project Properties, Configuration Properties, C/C++, Preprocessor, Preprocessor Defines:

    __asm(x)=
    

提交回复
热议问题