compilation errors caused by cstddef and eh.h

  • Thread starter Thread starter Alfonso Morra
  • Start date Start date
A

Alfonso Morra

Hi,

I'm compiling a DLL from (ANSI C) sources. I have set my project code
generation option to compile code as C. I have also disable C++
exception handling in my proj config.

However, when I attempt to build, I get the syntax errors (from cstddef)
and also the f error:

c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\eh.h(32):
fatal error C1189: #error : "eh.h is only for C++!"


Anyone knows how to fix this?

Many Thanks
 
Hi,

I'm compiling a DLL from (ANSI C) sources. I have set my project code
generation option to compile code as C. I have also disable C++
exception handling in my proj config.

However, when I attempt to build, I get the syntax errors (from cstddef)
and also the f error:

c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\eh.h(32):
fatal error C1189: #error : "eh.h is only for C++!"


Anyone knows how to fix this?

The header <cstddef> is a C++ header. A C program should #include
<stddef.h>, and it shouldn't #include <eh.h> at all.
 
Doug said:
The header <cstddef> is a C++ header. A C program should #include
<stddef.h>, and it shouldn't #include <eh.h> at all.

I've managed to fix this. I was pulling in a header file that was
pulling in <exception> for some exception handling stuff.
 
Back
Top