Solved

precompiled header error

Posted on 2000-04-24
3
241 Views
Last Modified: 2013-11-20

Hello.  My name is Jong Woo Park from S. KOREA

When compiling, I met error message like this
"unexpected end of file while looking for precompiled header
directive"

This problem was solved with attaching this header on my class
like this.

#include "stdafx.h"

My class has no relation with atdafx.h , It was compiled and run in
DOS mode(win32 console application mode)  but when I add this
class to my window program project, precomfiled file error occurred.

Could you explane about this?
0
Comment
Question by:worker018
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 11

Accepted Solution

by:
mikeblas earned 50 total points
ID: 2746384
If you don't want to use "stdafx.h", then you must not provide the /Yu command-line option. The /Yu option tells the compiler to look for a particular #include directive, and that directive is expected to reference the header file named with the /Yu option.

I think you have "/Yu stdafx.h" on your command line.

If you're using the IDE, you can do this:

1) Use the "Settings..." command in the "project" menu
2) In the resulting "Project settings" dialog, expand the items in the left-hand side tree control.
3) Highlight the source file in question.
4) Activate the "C/C++" tab on the right hand side
5) Pick "Precompiled headers" in the drop-down "Category" list
6) mark the "not using precompiled headers" radio button

Make sure you do "Rebuild all" after this change.

..B ekiM

0
 

Author Comment

by:worker018
ID: 2746486
Thank you for your answer
0
 
LVL 11

Expert Comment

by:mikeblas
ID: 2746514
Sure; I hope it helped.  Why did you give a grade of "B"?  Did you find something wrong with the answer?  Was there something you needed that I left out?

..B ekiM
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
function returning CString in a regular win32 DLL 8 216
Generic progress indicator 6 121
Change owner from userA to server Local Administrators 7 74
wordcount challenge 11 164
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question