If you want to make a header suitable for both C and C++ compilers, you
could put all the declarations inside extern "C" brackets, but the C
compiler does not recognize the syntax. Every C++ compiler predefines
the macro __cplusplus, so you can use that macro to guard the C++ syntax
extensions:

#ifdef __cplusplus
extern "C" {
#endif
... /* body of header */
#ifdef __cplusplus
} /* closing brace for extern "C" */
#endif

Thanks,
Bharat

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
rajesh
Sent: Tuesday, July 08, 2008 2:15 PM
To: [email protected]
Subject: [Sip-implementors] How to include c++ header file in c .

Hi,
I have one Application built in c and have one c++  header file .
How to compile that Application as I am getting error "eh.h is only for
C++!" .
This is windows based Application .

Thanks and Regards
Rajesh Kumar
Sr. Software Engineer
R & D - Network Group 
ImiMobile Pvt Ltd
+91 40 23555945 - 235
+91 99084 00027
www.imimobile.com 

_______________________________________________
Sip-implementors mailing list
[email protected]
https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email. 

www.wipro.com

_______________________________________________
Sip-implementors mailing list
[email protected]
https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors

Reply via email to