Fatal Error C1189
Visual Studio 2005
Error Message
#error : user supplied error messageC1189 is generated by #error.
For more information, see The #error Directive.
The following sample generates C1189:
// C1189.cpp #undef _WIN32 #if !defined(_WIN32) #error _WIN32 must be defined // C1189 #endif
You may also see this error if you build an ATL project with the /robust MIDL compiler option. /robust is only for use when building for a Windows 2000 or later machine. So, either remove /robust or change this line in the dlldatax.c file:
#define _WIN32_WINNT 0x0400 // for WinNT 4.0 or Win95 with DCOM
to
#define _WIN32_WINNT 0x0500 // for WinNT 4.0 or Win95 with DCOM
To remove /robust, specify /no_robust in the Advanced property page in the MIDL property page folder. See MIDL Property Pages: Advanced for more information.