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

S

sachinv1821

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 :)
 
B

Ben Bacarisse

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.
 
S

sachinv1821

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.

Thanks Ben i Do tat now
 
S

SM Ryan

# 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top