[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Telling VC to generate stdafx.h

Posted on 2001-06-17
4
Medium Priority
?
895 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

649 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