warning C4005: '_WIN32_WINNT' : macro redefinition
-
In one project, I have two classes containing #include < windows.h> in both .cpp files. Class 1 has macro of including the class 2 in the .h file. Class1.h #include "class2.h" Class1.cpp #include < windows.h> Class2.cpp #include < windows.h> During compilation, I received following warning message: C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\Windows.h(16) : warning C4005: '_WIN32_WINNT' : macro redefinition command-line arguments : see previous definition of '_WIN32_WINNT' What is solution to avoid this warning?
-
In one project, I have two classes containing #include < windows.h> in both .cpp files. Class 1 has macro of including the class 2 in the .h file. Class1.h #include "class2.h" Class1.cpp #include < windows.h> Class2.cpp #include < windows.h> During compilation, I received following warning message: C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\Windows.h(16) : warning C4005: '_WIN32_WINNT' : macro redefinition command-line arguments : see previous definition of '_WIN32_WINNT' What is solution to avoid this warning?
This is not a .NET framework question at all, but the answer is to include windows.h in your std.afx file, I reckon.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )