Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Fatal Error C1189
Collapse the table of content
Expand the table of content

Fatal Error C1189

Error Message

#error : user supplied error message

C1189 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

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


#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.

Community Additions

© 2015 Microsoft