Reputation:
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...
Upvotes: 7
Views: 16447
Reputation: 93
To add a bit of precision, in my case I just needed to change the Include path of one of the .h files I used as shown below.
I started with this Include path :
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\crt\src
and then changed it to:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include
which is where the right header file was located.
Upvotes: 3
Reputation: 340168
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.
Upvotes: 14