winelib and no mfc

Bill Medland medbi01 at
Fri Jul 13 09:16:34 CDT 2001

Hi Francois

Francois Gouget <fgouget at> wrote in article
<Pine.LNX.4.21.0107121001480.6768-100000 at amboise.dolphin>...
> On Thu, 12 Jul 2001, Bill Medland wrote:
> [...]
> > I have noticed that if ones code comes out of the Visual Studio
> > (even if it doesn't use MFC and ATL) the current winemaker (and quite
> > possibly all of them so far) are easily led to believe that it does. 
> > myself (since I'm just playing so far) I simply edit the
> > to correct that.
>    I guess this is because the current Winemaker assumes that if a file
> called 'stdafx.h' is present then the project is an MFC one. Maybe this
> needs to be fixed, but I'm not really sure then how to detect that a
> project is an MFC one. Maybe it should look for an atl.h or afx.h when
> it is parsing the files to fix the include directives. Unfortunately
> this is done too late in the process...
>    When does VC6 create this 'stdafx.h' file anyway? I know it's used
> for precompiled headers but not all projects using these have it. Is it
> one of the wizards that does this?

yes.  It seems to me that if the user uses the "Create Project" option,
which invokes the wizard, and then chooses any option other than an empty
project, then VC++ will generate a StdAfx.h and StdAfx.c, both of them
being present to allow it to manage precompiled headers.

I've just tried making a Win32 console application that supports mfc and it
creates a "Hello, world" that initialises the MFC.  The obvious
differentiator is that StdAfx.h includes afx.h and afxwin.h.

I would suggest that we take the hint from the afx.h (which looks as if it
only contains stuff required for MFC and is clearly essential for MFC)


p.s. Winemaker's impressive!

More information about the wine-users mailing list