fatal error C1189: #error : "eh.h is only for C++!"

Hi,

I am experiencing a fatal error while compiling.  The 
exact message is :  
c:\program files\microsoft visual studio\vc98\include\eh.h
(32) : fatal error C1189: #error :  "eh.h is only for C++!"

Could anyone please tell me how to rectify this.

Thanks in advance,
-Kalpaga

0
9/17/2003 10:54:28 AM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
2425 Views

Similar Articles

[PageSpeed] 5

Prolly cause of a line such as :-

#ifndef __cplusplus
    #error "eh.h is only for C++!"
#endif

Presumably its not safe to use this include file in a C program (perhaps it
uses some C++ only features)

--
Regards,
Nish [VC++ MVP]



"kalpaga" <kalpaga.kanakarajan@honeywell.com> wrote in message
news:5d2501c37d0a$10f25dd0$a601280a@phx.gbl...
> Hi,
>
> I am experiencing a fatal error while compiling.  The
> exact message is :
> c:\program files\microsoft visual studio\vc98\include\eh.h
> (32) : fatal error C1189: #error :  "eh.h is only for C++!"
>
> Could anyone please tell me how to rectify this.
>
> Thanks in advance,
> -Kalpaga
>


0
nish (347)
9/17/2003 12:29:17 PM
kalpaga wrote:
> c:\program files\microsoft visual studio\vc98\include\eh.h
> (32) : fatal error C1189: #error :  "eh.h is only for C++!"
> 
> Could anyone please tell me how to rectify this.

Rename .c file into .cpp file. Remove from project .c file and add to 
project new .cpp file.

0
mac1 (347)
9/17/2003 12:29:59 PM
It is pretty much self-explanatory. You have a C program, and you are including a header
file that is only valid for C++. Either don't use that header file, or change your file to
a .cpp file.
				joe

On Wed, 17 Sep 2003 03:54:28 -0700, "kalpaga" <kalpaga.kanakarajan@honeywell.com> wrote:

>Hi,
>
>I am experiencing a fatal error while compiling.  The 
>exact message is :  
>c:\program files\microsoft visual studio\vc98\include\eh.h
>(32) : fatal error C1189: #error :  "eh.h is only for C++!"
>
>Could anyone please tell me how to rectify this.
>
>Thanks in advance,
>-Kalpaga

Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15972)
9/17/2003 8:33:01 PM
Reply:

Similar Artilces:

fatal error C1189: #error : "eh.h is only for C++!"
Hi, I am experiencing a fatal error while compiling. The exact message is : c:\program files\microsoft visual studio\vc98\include\eh.h (32) : fatal error C1189: #error : "eh.h is only for C++!" Could anyone please tell me how to rectify this. Thanks in advance, -Kalpaga Prolly cause of a line such as :- #ifndef __cplusplus #error "eh.h is only for C++!" #endif Presumably its not safe to use this include file in a C program (perhaps it uses some C++ only features) -- Regards, Nish [VC++ MVP] "kalpaga" <kalpaga.kanakarajan@honeywell.com> wr...