• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 911
  • Last Modified:

Telling VC to generate stdafx.h

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
RichJackson
Asked:
RichJackson
  • 2
1 Solution
 
elcapitanCommented:
>>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
 
RichJacksonAuthor Commented:
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
 
elcapitanCommented:
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
 
agriggsCommented:
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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now