Compiler Warning (level 1) C4005
'identifier' : macro redefinition
The macro identifier is defined twice. The compiler uses the second macro definition.
To fix by checking the following possible causes
Defining a macro on the command line and in the code with a
#define
directive.Macros imported from include files.
To fix by using the following possible solutions
Remove one of the definitions.
Use an #undef directive before the second definition.
The following sample generates C4005:
// C4005.cpp
// compile with: /W1 /EHsc
#include <iostream>
using namespace std;
#define TEST "test1"
#define TEST "test2" // C4005 delete or rename to resolve the warning
int main() {
cout << TEST << endl;
}