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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:08:27+00:00 2026-06-03T04:08:27+00:00

I cannot compile my iPhone project. In my CType.h I am getting the error:

  • 0

I cannot compile my iPhone project. In my CType.h I am getting the error:

Cannot find interface declaration for ‘NSObject’, superclass of
‘CType’.

This results in a lot of others errors which are also in the same header file.

I have read that this could be due to a circular reference in my project. Therefore, I have tried to change many of my header imports to forward declarations. There are still some which I have not managed to make a forward declaration yet (e.g. if the class inherits from another class, then it needs the import and if I am using a delegate. There probably is a way around this, though).

I have been searching through my project multiple times but I have not managed to find the circular reference. Is there any tips or tricks to find a circular reference? I thought it would have something to do with my CType but it does not seem so.

EDIT:

This is my CType:

Interface:

#import <Foundation/Foundation.h>

@interface CType : NSObject

/*
 * Type ID
 */
@property (nonatomic, assign) NSInteger typeId;

/*
 * Type
 */
@property (nonatomic, strong) NSString *type;

/*
 * Initialize with type ID and type
 */
- (id)initWithId:(NSInteger)typeId type:(NSString *)type;

/*
 * Type with type ID and type
 */
+ (CType *)typeWithId:(NSInteger)typeId type:(NSString *)type;

@end

Implementation:

#import "CType.h"

@implementation CType

/* Create setters and getters */
@synthesize typeId;
@synthesize type;

/* Initialize with type ID and type */
- (id)initWithId:(NSInteger)_typeId type:(NSString *)_type
{
    if (self = [super init])
    {
        self.typeId = _typeId;
        self.type = _type;
    }

    return self;
}

/* Type with type ID and type */
+ (CType *)typeWithId:(NSInteger)typeId type:(NSString *)type
{
    return [[CType alloc] initWithId:typeId type:type];
}

@end
  • 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-03T04:08:28+00:00Added an answer on June 3, 2026 at 4:08 am

    I tend to agree with @Hot Licks. This could very well be a corrupted file or a misconfiguration because theoretically there is nothing wrong with your code.

    This is what I would suggest:

    Create a new class (named something other than CType) and migrate your code over from CType to the new class. Then delete your old CType files. If things work at that point then rename your new class to CType and see what happens. Also, double check your apps prefix.pch file to see what headers are imported in there.

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

Sidebar

Related Questions

Hallo, I cannot compile my project using an ant build script. The error message:
I cannot compile my because of this error in my header: error: expected identifier
I am getting compiler error D8045. cannot compile C file 'serialcommands.c' with the /clr
The following code throws an compile-time error like Cannot convert type 'string' to 'int'
The following code does not compile, saying error C2248: 'A::getMe' : cannot access private
In Java, constructors cannot be recursive. Compile time error: recursive constructor invocation. Let's assume
I cannot compile via CMD the class that is implemented an Interface. But It
For some strange reason g++ (versions 4.5.0 and 4.5.2) cannot compile this code: bool
I'm creating an iPhone 5.0 project in Xcode 4.2 and would like to find
I am working on a platform with a gcc compiler however boost cannot compile

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.