468,458 Members | 1,848 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,458 developers. It's quick & easy.

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

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
3 1548
"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
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
"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.

Similar topics

9 posts views Thread by ree | last post: by
reply views Thread by DotNetJunkies User | last post: by
1 post views Thread by DotNetJunkies User | last post: by
7 posts views Thread by Gordon Smith | last post: by
14 posts views Thread by James Thiele | last post: by
2 posts views Thread by Sintesi | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kmladenovski | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.