views:

1111

answers:

1

I get the following compilation error

fatal error C1189: #error : ERROR: Use of C runtime library internal header file.

I absolutely have no idea about it. can anyone throw some light on it?

The complete error:

C:\Program Files\Microsoft Visual Studio 8\VC\ce\include\crtdefs.h(100) : fatal error C1189: #error : ERROR: Use of C runtime library internal header file. Generating Code...

+4  A: 

You've probably got crt/src in your include directory search path. The headers in there are used to build the C Runtime - they aren't intended for use in user programs (even though they may have the same names as files that are intended to be included).

If you look in the header that's causing the problem, you'll probably see something like this:

/* This version of the header files is NOT for user programs.
 * It is intended for use when building the C runtimes ONLY.
 * The version intended for public use will not have this message.
 */

You need to fix your include search path.

I see you have ce/include in your include search path - are you building a WinCE application? If so, your build should be defining _WIN32_WCE to prevent this problem. If not, this directory should not be in the include path.

Michael Burr