Error 1 fatal error C1083: Cannot open precompiled header file: 'Debug\123.pch': No s
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Error 1 fatal error C1083: Cannot open precompiled header file: 'Debug\123.pch': No s

  1. #1
    Join Date
    Apr 2007
    Location
    Mars NASA Station
    Posts
    1,436

    Error 1 fatal error C1083: Cannot open precompiled header file: 'Debug\123.pch': No s

    Hello to all expect MFC programmer, i use AppWizard to generate some classes for my application but return this kind of error where i cannot solve.

    The project name is 123.

    When i double click the error in error list, it show the error appear in

    #include "stdafx.h"

    What is the purpose and function of this header file ?

    Thanks for your help.

  2. #2
    Join Date
    Apr 2007
    Location
    Mars NASA Station
    Posts
    1,436

    Re: Error 1 fatal error C1083: Cannot open precompiled header file: 'Debug\123.pch': No s

    After few research, the answers is go to project properties and set it not using precompiled headers.

    What is precompiled headers, purpose and function ?

  3. #3
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,197

    Re: Error 1 fatal error C1083: Cannot open precompiled header file: 'Debug\123.pch': No s


  4. #4
    Join Date
    Mar 2003
    Location
    India {Mumbai};
    Posts
    3,871

    Re: Error 1 fatal error C1083: Cannot open precompiled header file: 'Debug\123.pch': No s

    For Visual C++ compiler a PCH is one which rarely changes. So, when you Rebuild; or Clean, Build, the contents of PCH (generally, stdafx.h ) is NOT compiled - thus saving compilation time.

    Compilation time further reduces when you put all (or most) required headers into this header. This, way none of those included files will get compiled again (since compliler know that aren't changed).

    Please note that if PCH file (stdafx.h) or any of the files included changes, the compiler WILL compile the file. Modifying stdafx.h may result in whole program compilation!

    For short projects you may omit usage of PCH, but for moderate and large projects, you should use this feature.
    My latest article: Explicating the new C++ standard (C++0x)

    Do rate the posts you find useful.

Posting Permissions

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


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center