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 8692333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:17:41+00:00 2026-06-13T00:17:41+00:00

Possible Duplicate: cannot find interface declaration for ‘AbstractPickerView’,superclass of ‘AttackLayer’ There are 3 header

  • 0

Possible Duplicate:
cannot find interface declaration for ‘AbstractPickerView’,superclass of ‘AttackLayer’

There are 3 header files (a superclass and 2 subclasses):

//  A.h
@interface A : NSObject
@end

//  A1.h
#import "A.h"
@interface A1 : A
@end

//  A2.h
#import "A.h"
@interface A2 : A
@end

I want to import all subclasses of class A.
So I added 2 #import in A.h like this:

//  A.h
#import "A1.h" // added
#import "A2.h" // added

@interface A : NSObject
@end

But after adding them, the following compile errors occurred.

Cannot find interface declaration for 'A', superclas of 'A1'
Cannot find interface declaration for 'A', superclas of 'A2'

I know that this error can be solved by createing and importing the following file.

// ASubclasses.h
#import "A1.h"
#import "A2.h"

But I think #import A.h is more simple than #import ASubclasses.h to import subclasses.
And if I can use #import A.h to import subclasses, I don’t need to create another file(ASubclasses.h).

Is there a way to use #import A.h to import all subclasses of A?
Or in general, how do you import all subclasses of a class?

  • 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-13T00:17:42+00:00Added an answer on June 13, 2026 at 12:17 am

    The error you’re getting is because of an #import cycle . This happens when two header files import each other . You can just declare the class using @class and then import the headerfile in the implementation file.

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

Sidebar

Related Questions

Possible Duplicate: Wpf Toolkit. Bind DataGrid Column Header to DynamicResource WPF Error: Cannot find
Possible Duplicate: PHP error: Cannot modify header information – headers already sent I've built
Possible Duplicate: Cannot connect to UserPC\SQLExpress I have been struggling to find a solution
Possible Duplicate: Beautiful Soup cannot find a CSS class if the object has other
Possible Duplicate: Cannot find window-based application on XCode I am pretty new to IOS
Possible Duplicate: “Warning: Cannot modify header information - headers already sent by” error In
Possible Duplicate: Cannot declare Public static final String s = new String(“123”) inside an
Possible Duplicate: c++ publicly inherited class member cannot be used as default argument Nonstatic
Possible Duplicate: Why is this code invalid in C#? Conditional operator cannot cast implicitly?
In SQL its possible to have fields that cannot contain duplicate data. How is

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.