0

Which header shall i use for CStdioFile?

The relevant doc is here

when I try including afx.h , i get following error( window.h is included before afx.h because of some other function):

Error 1 error C1189: #error : WINDOWS.H already included. MFC apps must not #include C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\atlmfc\include\afxv_w32.h

I wan to remain in native C++ world.

I am using visual studio 2013

If there is a basic setting in project properties that is relevant here, please let me know.

alabama1
  • 11
  • 4
  • because you are not using precompiled headers you cannot use afx.h? Could you elaborate that? Why not include afx.h where you need it? – default Nov 05 '15 at 21:16
  • Actually I am using windows.h and it seems that conflict with using afx.h . In the light of your comment I am editing original question with error when I try to include both. – alabama1 Nov 05 '15 at 21:21
  • what if you flip the include order? – default Nov 05 '15 at 21:34
  • I flipped. Now, I am getting link errors e.g. Error 4 error LNK2005: _DllMain@12 already defined in LIBCMTD.lib(dllmain.obj) – alabama1 Nov 05 '15 at 21:37

0 Answers0