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

Discussion in 'C Programming' started by sachinv1821, Jan 7, 2008.

  1. sachinv1821

    sachinv1821 Guest

    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 :)
     
    sachinv1821, Jan 7, 2008
    #1
    1. Advertisements

  2. 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 Bacarisse, Jan 7, 2008
    #2
    1. Advertisements

  3. sachinv1821

    sachinv1821 Guest

    Thanks Ben i Do tat now
     
    sachinv1821, Jan 7, 2008
    #3
  4. sachinv1821

    SM Ryan Guest

    # 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, Jan 7, 2008
    #4
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.