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

    C SOurce file in VC++

    Hi,

    Environment: VC++5.0, Windows NT.

    I have a question related to Precompiled header.

    I have a dialog based application.When I am trying to add a C source file
    i.e test.c and try to build the work space its giving an error "Unexpected end of file while looking for a precompiled header directive".

    Any body knows the answer for this, Please let me know.

    Thanx in advance.





  2. #2
    Join Date
    Apr 1999
    Location
    Germany
    Posts
    418

    Re: C SOurce file in VC++

    Hi,

    VC is missing the header file for which he wants to use the precompiled header file. Sorry, I can't explain it very good in German, so in English is even more worse.

    But I can tell you how to prevent it. Either include stdafx.h at the top of your .c file, or tell the compiler in the project settings (menu Project->Settings or Alt-F7) not to use precompiled headers for this file. In the file list you need to select the file, change to the C/C++ tab, choose "Precompiled Headers" in the combo box, and select the radio button "Not using precompiled headers".

    HTH

    Martin

  3. #3
    Guest

    Re: C SOurce file in VC++

    Thanx for the solution.



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