View Single Post
Old 04-27-2005, 10:16 AM   #1 (permalink)
QUantumAnenome
Code Monkey
 
Join Date: Mar 2005
Posts: 56
QUantumAnenome is on a distinguished road
Send a message via Yahoo to QUantumAnenome
#include "stdafx.h"

I have a source file that I use for both MFC and consol apps. (.NET 2003)
When compiling under MFC, the #include "stdafx.h" is required.
When compiling a different consol project, I have to comment it out.
I tried
Code:
#ifdef __MFC__
#include "stdafx.h"
#endif
but having ANYTHING (including the #ifdef) in front of the stdafx.h causes a compiler error.

For now, I just add an empty stdafx.h to all my consol apps that share a source file with an MFC app.

Any other ideas?

Thanks!

Last edited by redhead; 04-27-2005 at 12:48 PM.
QUantumAnenome is offline   Reply With Quote