Click to See Complete Forum and Search --> : C SOurce file in VC++


April 6th, 1999, 04:05 PM
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.

Martin Speiser
April 7th, 1999, 02:23 AM
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

April 7th, 1999, 06:58 PM
Thanx for the solution.