By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,086 Members | 1,452 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,086 IT Pros & Developers. It's quick & easy.

[Urgent]: How To Accessing C++ Class objects in C : getting error

P: n/a
hi ,
i am Getting this Error
fatal error C1189: #error : "eh.h is only for C++!"
my Problem is i am Having C++ librabry and Appropriate .h file
i want to Access Them is .c File Files.....
to Be More Specific i am Creating a C++ Object in a C file...
this Giving me the error!!! :(

can Any Body Please Help me

How to Access the C++ object in C file...
Thanks In Advance :)
Jan 7 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"sa*********@gmail.com" <sa*********@gmail.comwrites:
How to Access the C++ object in C file...
Thanks In Advance :)
You'd be better off asking in comp.lang.c++. I know this sounds odd,
since your problem seems to be caused by C, but it is C++ that has
all the answers. All the details from what to do to get started to
what you can and can not access from C and any pit falls to beware of
are all C++ matters, and it is C++ experts who will give you the best
advice.

--
Ben.
Jan 7 '08 #2

P: n/a
On Jan 7, 4:10*pm, Ben Bacarisse <ben.use...@bsb.me.ukwrote:
"sachinv1...@gmail.com" <sachinv1...@gmail.comwrites:
How to Access the C++ object in C file...
Thanks In Advance :)

You'd be better off asking in comp.lang.c++. *I know this sounds odd,
since your problem seems to be caused by C, but it is C++ that has
all the answers. *All the details from what to do to get started to
what you can and can not access from C and any pit falls to beware of
are all C++ matters, and it is C++ experts who will give you the best
advice.

--
Ben.
Thanks Ben i Do tat now
Jan 7 '08 #3

P: n/a
"sa*********@gmail.com" <sa*********@gmail.comwrote:
# hi ,
# i am Getting this Error
# fatal error C1189: #error : "eh.h is only for C++!"
# my Problem is i am Having C++ librabry and Appropriate .h file
# i want to Access Them is .c File Files.....
# to Be More Specific i am Creating a C++ Object in a C file...
# this Giving me the error!!! :(

One way to is to write a small C++ source file
that imports the C++ declarations and exports extern "C"
functions and structs the C sources can import.

--
SM Ryan http://www.rawbw.com/~wyrmwif/
There are subtler ways of badgering a witness.
Jan 7 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.