?
Solved

Telling VC to generate stdafx.h

Posted on 2001-06-17
4
Medium Priority
?
885 Views
Last Modified: 2013-11-20
Hi,

I got some source files which i am putting in a project . They  make use of MFC, I changed the settings of the project, to "USE MFC LINKED"

But when i build the project it still can't find "stdafx.h"

How do i instruct vc to regenerate stdafx.h?

Cheers

Rich  
0
Comment
Question by:RichJackson
[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
4 Comments
 
LVL 3

Expert Comment

by:elcapitan
ID: 6200956
>>But when i build the project it still can't find "stdafx.h"
>>How do i instruct vc to regenerate stdafx.h?

I'm not sure that I understood the problem, but I think it is better to tell the compiler in this case not to use precompiled header. Do that at: project->settings->/c/c++->precompiled headers. select Not using precompiled headers.

--EC--
0
 

Author Comment

by:RichJackson
ID: 6201944
Basically I had a CPP file, which i wanted to run.  Which had no workspace or project.

I ended up creating a new one and copying in stdafx.h stdafx.cpp and resource.h

But i though VC should have handled all this for me

Thanks For Your Time
0
 
LVL 3

Expert Comment

by:elcapitan
ID: 6202301
You can create new win32 project (file->new->projects->win32 application). Make sure you selected: 'A simple win32 application'. A project with stdafx.h stdafx.cpp and another .cpp file was created. Now you can copy/paste from the old project into the new project.

--EC--
0
 
LVL 2

Accepted Solution

by:
agriggs earned 20 total points
ID: 6202665
I think if you just double-click on the CPP file, VC will load it and create a workspace that is at least somewhat appropriate for running it.
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

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: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month9 days, 23 hours left to enroll

762 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