CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Include error

  1. #1
    Join Date
    Mar 2005
    Posts
    55

    Fatal Error c1189

    I have solution with two projects.
    Each project is compiled successfully.
    When I write include at one project to file in the second project I get the fatal error:
    Fatal Error c1189 : #error : include 'stdafx.h' before including this file for PCH

    What is the problem?

  2. #2
    Join Date
    Jan 2005
    Location
    Brighton, England
    Posts
    241

    Re: Fatal Error c1189

    I hate precompiled headers, just disable them in the project settings and it should then compile.

  3. #3
    Join Date
    Feb 2005
    Location
    Pasadena, MD, USA
    Posts
    105

    Re: Include error

    Hi,

    #include "stdafx.h" should be the very first include in a source file (*.cpp).

    Jeff

  4. #4
    Join Date
    May 2000
    Location
    KY, USA
    Posts
    18,652

    Re: Include error

    [ Merged threads ]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured