none
PCH Header Warning

    Question

  • When making a class i have been getting an error message the following error message.

    PCH error

    This has happened before and I am not sure what caused it. I would like to have intellisense active for teh class for convinience but am not sure how to fix the error.

    Wednesday, May 25, 2011 11:45 PM

Answers

  • Are you facing this issue with VS + SP1?

    IT looks like already reported.

    PCH warning after installing SP1

     

    You can also try with the following options.

    Properties -> configuration properties-> C/C++-> Precompiled Headers->Create/USe Precompiled Header -> Not using precompiled headers

     


    Thanks and Regards Selvam http://www15.brinkster.com/selvamselvam/
    Thursday, May 26, 2011 4:55 AM
  • >PCH error
    >Error PCH warning: header stop cannot be in macro
    >or #if block.

    This is a precompiled header error. The "header stop"
    to control what is precompiled is determined by the
    presence and location of this statement:

    #include "stdafx.h"

    There should be nothing (except comments) *before*
    that statement in your source code.

    - Wayne
    Wednesday, May 25, 2011 11:59 PM

All replies

  • hmmm... the image didn't upload.

    The error message is " Error PCH warning: header stop cannot be in macro or #if block. An intellisense file was not generated.

    This is my code at the moment.

    // Sprite.h
    
    #ifndef SPRITE_H
    #define SPRITE_H
    
    class Sprite{
    
    
    }
    
    #endif
    
    On a side note, is there a way to upload images along with these posts?
    Wednesday, May 25, 2011 11:48 PM
  • >PCH error
    >Error PCH warning: header stop cannot be in macro
    >or #if block.

    This is a precompiled header error. The "header stop"
    to control what is precompiled is determined by the
    presence and location of this statement:

    #include "stdafx.h"

    There should be nothing (except comments) *before*
    that statement in your source code.

    - Wayne
    Wednesday, May 25, 2011 11:59 PM
  • Are you facing this issue with VS + SP1?

    IT looks like already reported.

    PCH warning after installing SP1

     

    You can also try with the following options.

    Properties -> configuration properties-> C/C++-> Precompiled Headers->Create/USe Precompiled Header -> Not using precompiled headers

     


    Thanks and Regards Selvam http://www15.brinkster.com/selvamselvam/
    Thursday, May 26, 2011 4:55 AM
  • Thanks that did it
    Thursday, May 26, 2011 6:04 PM