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. Inclusion of C file

Inclusion of C file

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

    Hi, I have a Visual C++ MFC Dialog based application. And I would like to include a .c and .h file in the project. When I tried to compile this project I had the following error: Unexpected end of file while looking for precompiled header directive, fatal error C1010. If anyone could help me with regards including c-code files in my project. Thanking you in anticipation

    C L S R 4 Replies Last reply
    0
    • R RuiSantiago

      Hi, I have a Visual C++ MFC Dialog based application. And I would like to include a .c and .h file in the project. When I tried to compile this project I had the following error: Unexpected end of file while looking for precompiled header directive, fatal error C1010. If anyone could help me with regards including c-code files in my project. Thanking you in anticipation

      C Offline
      C Offline
      Carlos Antollini
      wrote on last edited by
      #2

      You need to use automatic use of precompliled headers. Select project/settings (or ALT+F7) then, in the Project Settings Dialog, select the C/C++ tab, then select the Precompiled Headers item in the combo box, and select the Automatic use of precompliled headers option. Regards Carlos Antollini. Sonork ID 100.10529 cantollini

      1 Reply Last reply
      0
      • R RuiSantiago

        Hi, I have a Visual C++ MFC Dialog based application. And I would like to include a .c and .h file in the project. When I tried to compile this project I had the following error: Unexpected end of file while looking for precompiled header directive, fatal error C1010. If anyone could help me with regards including c-code files in my project. Thanking you in anticipation

        S Offline
        S Offline
        SteveKing
        wrote on last edited by
        #3

        also #include the "stdafx.h" file inside your c file. Or turn off the use of precompiled headers.

        1 Reply Last reply
        0
        • R RuiSantiago

          Hi, I have a Visual C++ MFC Dialog based application. And I would like to include a .c and .h file in the project. When I tried to compile this project I had the following error: Unexpected end of file while looking for precompiled header directive, fatal error C1010. If anyone could help me with regards including c-code files in my project. Thanking you in anticipation

          L Offline
          L Offline
          Lanny Thompson
          wrote on last edited by
          #4

          The project has set the c file to use a precompiled header (through stdafx.h). Since the c file doesn't have an #include "stdafx.h" the compiler gets an error searching for it. You just need to turn this option off for the file, through the file properties. Hope this helps, Lan

          1 Reply Last reply
          0
          • R RuiSantiago

            Hi, I have a Visual C++ MFC Dialog based application. And I would like to include a .c and .h file in the project. When I tried to compile this project I had the following error: Unexpected end of file while looking for precompiled header directive, fatal error C1010. If anyone could help me with regards including c-code files in my project. Thanking you in anticipation

            R Offline
            R Offline
            RuiSantiago
            wrote on last edited by
            #5

            It's working, thank you all!!!

            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