Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7913197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:47:07+00:00 2026-06-03T13:47:07+00:00

How would I import an Objective-C header in Objective-C++? This is the header: typedef

  • 0

How would I import an Objective-C header in Objective-C++?

This is the header:

typedef struct _xmlDoc xmlDoc;
typedef struct _xmlNs xmlNs;
typedef struct _xmlAttr xmlAttr;
typedef struct _xmlNode {
    void* _field1;
    int _field2;
    char* _field3;
    struct xmlNode* _field4;
    struct xmlNode* _field5;
    struct xmlNode* _field6;
    struct xmlNode* _field7;
    struct xmlNode* _field8;
    xmlDoc* _field9;
    xmlNs* _field10;
    char* _field11;
    xmlAttr* _field12;
    xmlNs* _field13;
    void* _field14;
    unsigned short _field15;
    unsigned short _field16;
} xmlNode;

typedef struct _xmlDict xmlDict;
typedef struct _xmlDtd xmlDtd;
struct _xmlDoc {
    void* _field1;
    int _field2;
    char* _field3;
    struct xmlNode* _field4;
    struct xmlNode* _field5;
    struct xmlNode* _field6;
    struct xmlNode* _field7;
    struct xmlNode* _field8;
    struct xmlDoc* _field9;
    int _field10;
    int _field11;
    struct xmlDtd* _field12;
    struct xmlDtd* _field13;
    struct xmlNs* _field14;
    char* _field15;
    char* _field16;
    void* _field17;
    void* _field18;
    char* _field19;
    int _field20;
    struct xmlDict* _field21;
    void* _field22;
    int _field23;
    int _field24;
};

struct _xmlNs {
    struct xmlNs* _field1;
    int _field2;
    char* _field3;
    char* _field4;
    void* _field5;
    struct xmlDoc* _field6;
};

struct _xmlAttr {
    void* _field1;
    int _field2;
    char* _field3;
    struct xmlNode* _field4;
    struct xmlNode* _field5;
    struct xmlNode* _field6;
    struct xmlAttr* _field7;
    struct xmlAttr* _field8;
    struct xmlDoc* _field9;
    struct xmlNs* _field10;
    int _field11;
    void* _field12;
};

struct _xmlDtd;

struct _xmlDict;

typedef struct sqlite3 sqlite3;

typedef struct sqlite3_stmt sqlite3_stmt;

When compiling my project it throws the following errors:

Structs.h:49:3: error: typedef redefinition with different types ('struct _xmlNode' vs 'xmlNode')
} xmlNode;
  ^
Structs.h:36:9: note: previous definition is here
        struct xmlNode* _field4;
               ^
Structs.h:62:9: error: elaborated type refers to a typedef
        struct xmlDoc* _field9;
               ^
Structs.h:29:24: note: declared here
typedef struct _xmlDoc xmlDoc;
                       ^
Structs.h:65:9: error: elaborated type refers to a typedef
        struct xmlDtd* _field12;
               ^
Structs.h:52:24: note: declared here
typedef struct _xmlDtd xmlDtd;
                       ^
Structs.h:67:9: error: elaborated type refers to a typedef
        struct xmlNs* _field14;
               ^
Structs.h:30:23: note: declared here
typedef struct _xmlNs xmlNs;
                      ^
Structs.h:74:9: error: elaborated type refers to a typedef
        struct xmlDict* _field21;
               ^
Structs.h:51:25: note: declared here
typedef struct _xmlDict xmlDict;
                        ^
Structs.h:81:9: error: elaborated type refers to a typedef
        struct xmlNs* _field1;
               ^
Structs.h:30:23: note: declared here
typedef struct _xmlNs xmlNs;
                      ^
Structs.h:86:9: error: elaborated type refers to a typedef
        struct xmlDoc* _field6;
               ^
Structs.h:29:24: note: declared here
typedef struct _xmlDoc xmlDoc;
                       ^
Structs.h:96:9: error: elaborated type refers to a typedef
        struct xmlAttr* _field7;
               ^
Structs.h:31:25: note: declared here
typedef struct _xmlAttr xmlAttr;
                        ^
Structs.h:98:9: error: elaborated type refers to a typedef
        struct xmlDoc* _field9;
               ^
Structs.h:29:24: note: declared here
typedef struct _xmlDoc xmlDoc;
                       ^
Structs.h:99:9: error: elaborated type refers to a typedef
        struct xmlNs* _field10;
               ^
Structs.h:30:23: note: declared here
typedef struct _xmlNs xmlNs;

Isn’t this because the header is written in Objective-C?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T13:47:08+00:00Added an answer on June 3, 2026 at 1:47 pm

    Yeah, the problem is you don’t have anything defined of type struct xmlNode. You have a type struct _xmlNode and a type xmlNode, but not struct xmlNode. You can replace all instances of struct xmlNode with xmlNode or struct _xmlNode.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Objective-C category of UIColor that I would like to import everywhere
I would like to know how I can import a library into Objective-C at
I am modifying a website on wordpress (codex) and I would like to import
I would like to be able to import TFS tasks / work items into
I would like to know what is the best import strategy within django reusable
In Python you can do a: from a import b as c How would
I am definitely a beginner when it comes to Objective-C! Any help would be
I'm trying to use an Objective-C class made in Python to do this but
I am programming in Objective-C but I would like to write a c function
I had to implement a C function in an Objective-C class that normally would

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.