c++ - error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>"** -
i have project use stdafx.h precompile header. means cpp file must contain #include "stdafx.h" first include.
however, in a.h, need include "afxinet.h", compiler complain this
"error c1189: #error : windows.h included. mfc apps must not #include "windows.h""
this because "afxinet.h" complains when windows.h included, "stdafx.h" have windows.h included , present first include in a.cpp.
this implies need somehow have "afxinet.h" included in front of "stdafx.h", "stdafx.h" precompile header , needs present first include...
how can resove dilemma?
if project uses mfc, should include headers in stdafx.h , not use windows.h (as included mfc); , if include windows.h, cannot use mfc. afxinet.h part of mfc, so, guess, should either (1) replace windows.h afxwin.h , "use mfc" in settings (2) don't use mfc wrappers wininet, use functions wininet.h
Comments
Post a Comment