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. Fatal error C1010

Fatal error C1010

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++
5 Posts 5 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
    roadragedave
    wrote on last edited by
    #1

    Im getting this error in a project Im working on, its referencing a .cpp file with function definitions, Im using the same .h & .cpp file on their own just using a main.cpp to test it and it works fine, but when I brought it over to the larger project I get this error: fatal error C1010: unexpected end of file while looking for precompiled header directive. I checked the MSDN library and it was of absolutly no help whatsoever, I dont know what it even means. Im using VC7 with win2k. Cheers We have a mathematician, a different kind of mathematician, and a statistician!

    T D M M 4 Replies Last reply
    0
    • R roadragedave

      Im getting this error in a project Im working on, its referencing a .cpp file with function definitions, Im using the same .h & .cpp file on their own just using a main.cpp to test it and it works fine, but when I brought it over to the larger project I get this error: fatal error C1010: unexpected end of file while looking for precompiled header directive. I checked the MSDN library and it was of absolutly no help whatsoever, I dont know what it even means. Im using VC7 with win2k. Cheers We have a mathematician, a different kind of mathematician, and a statistician!

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #2

      arf, i've already seen that error, and i've got abslolutely no idea about its cause. To avoid that, check Your project settings and disable the precompiled headers... it will work. if anybody know about the reason this error occurs, let us know !!

      TOXCCT >>> GEII power

      1 Reply Last reply
      0
      • R roadragedave

        Im getting this error in a project Im working on, its referencing a .cpp file with function definitions, Im using the same .h & .cpp file on their own just using a main.cpp to test it and it works fine, but when I brought it over to the larger project I get this error: fatal error C1010: unexpected end of file while looking for precompiled header directive. I checked the MSDN library and it was of absolutly no help whatsoever, I dont know what it even means. Im using VC7 with win2k. Cheers We have a mathematician, a different kind of mathematician, and a statistician!

        D Offline
        D Offline
        Diddy
        wrote on last edited by
        #3

        put #include "stdafx.h" at the top of the file. Or, go to project->settings and select the file. Go to C++->Precompiled Headers and set it to "Not using precompiled headers"

        1 Reply Last reply
        0
        • R roadragedave

          Im getting this error in a project Im working on, its referencing a .cpp file with function definitions, Im using the same .h & .cpp file on their own just using a main.cpp to test it and it works fine, but when I brought it over to the larger project I get this error: fatal error C1010: unexpected end of file while looking for precompiled header directive. I checked the MSDN library and it was of absolutly no help whatsoever, I dont know what it even means. Im using VC7 with win2k. Cheers We have a mathematician, a different kind of mathematician, and a statistician!

          M Offline
          M Offline
          Mike Beckerleg
          wrote on last edited by
          #4

          Your larger project is setup to use precompiled headers. This allows you to setup a set of include files that are used through-out your project and have them compiled just once. This is normally done by including the required headers in stdafx.h. Then when compiling the project VC++ expects stdafx.h to be included at the start of each .cpp file. Just add #include "stdafx.h" to the start of the new .cpp file.

          1 Reply Last reply
          0
          • R roadragedave

            Im getting this error in a project Im working on, its referencing a .cpp file with function definitions, Im using the same .h & .cpp file on their own just using a main.cpp to test it and it works fine, but when I brought it over to the larger project I get this error: fatal error C1010: unexpected end of file while looking for precompiled header directive. I checked the MSDN library and it was of absolutly no help whatsoever, I dont know what it even means. Im using VC7 with win2k. Cheers We have a mathematician, a different kind of mathematician, and a statistician!

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

            You've already gotten an answer but for future reference, check the FAQ[^] before posting. Your answer is there too: 2.5 I added some source files I got from someone else into my project and the compiler gives the error "C1010: unexpected end of file while looking for precompiled header directive." Why?[^] --Mike-- Personal stuff:: Ericahist | Homepage Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ ---- You cannot truly appreciate Dilbert unless you've read it in the original Klingon.

            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