Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. unexpected end of file while looking for precompiled header directive

unexpected end of file while looking for precompiled header directive

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++debuggingtutorialquestion
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    romuzu
    wrote on last edited by
    #1

    unexpected end of file while looking for precompiled header directive i have this error when i compile my project on debug mode but when i compile it in release mode it doesn't have this problem. Please help me. i don't know how to debug this and how come the error occurs when I compile it in debug mode and not when I compile it in release mode. What probably is the cause? Does it mean that i have a missing file? I'm new to Visual C++ Programming.

    J I M 3 Replies Last reply
    0
    • R romuzu

      unexpected end of file while looking for precompiled header directive i have this error when i compile my project on debug mode but when i compile it in release mode it doesn't have this problem. Please help me. i don't know how to debug this and how come the error occurs when I compile it in debug mode and not when I compile it in release mode. What probably is the cause? Does it mean that i have a missing file? I'm new to Visual C++ Programming.

      J Offline
      J Offline
      John M Drescher
      wrote on last edited by
      #2

      Put this at the top of every cpp file:

      #include "stdafx.h"

      John -- modified at 21:25 Friday 10th March, 2006

      R 1 Reply Last reply
      0
      • R romuzu

        unexpected end of file while looking for precompiled header directive i have this error when i compile my project on debug mode but when i compile it in release mode it doesn't have this problem. Please help me. i don't know how to debug this and how come the error occurs when I compile it in debug mode and not when I compile it in release mode. What probably is the cause? Does it mean that i have a missing file? I'm new to Visual C++ Programming.

        I Offline
        I Offline
        Intertherain
        wrote on last edited by
        #3

        delete Debug directory, and delete .clw, .opt, .NCB files. then compile again. libo

        1 Reply Last reply
        0
        • J John M Drescher

          Put this at the top of every cpp file:

          #include "stdafx.h"

          John -- modified at 21:25 Friday 10th March, 2006

          R Offline
          R Offline
          romuzu
          wrote on last edited by
          #4

          i did what you have suggested. It resulted to another error. here it is: fatal error C1853: 'Debug/CMMITool.pch' is not a precompiled header file created with this compiler the file which i included the stdafx.h header file is a C source file. this must have caused the other error.

          J 1 Reply Last reply
          0
          • R romuzu

            unexpected end of file while looking for precompiled header directive i have this error when i compile my project on debug mode but when i compile it in release mode it doesn't have this problem. Please help me. i don't know how to debug this and how come the error occurs when I compile it in debug mode and not when I compile it in release mode. What probably is the cause? Does it mean that i have a missing file? I'm new to Visual C++ Programming.

            M Offline
            M Offline
            Michael Dunn
            wrote on last edited by
            #5

            See the FAQ C1010: unexpected end of file while looking for precompiled header directive[^] --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ

            1 Reply Last reply
            0
            • R romuzu

              i did what you have suggested. It resulted to another error. here it is: fatal error C1853: 'Debug/CMMITool.pch' is not a precompiled header file created with this compiler the file which i included the stdafx.h header file is a C source file. this must have caused the other error.

              J Offline
              J Offline
              John M Drescher
              wrote on last edited by
              #6

              Delete Debug/CMMITool.pch and try again. A pch file may not be used on two different versions of VC++. John

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups