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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:36:10+00:00 2026-06-13T05:36:10+00:00

I have two classes. APPagine.h #import <Foundation/Foundation.h> @interface APPagineMedia : NSObject @property (nonatomic, retain)

  • 0

I have two classes.

APPagine.h

#import <Foundation/Foundation.h>
@interface APPagineMedia : NSObject
@property (nonatomic, retain) NSString *Immagine;
@property (nonatomic, retain) NSString *Video;
@end

@interface APPagineDescription : NSObject
@property (nonatomic, retain) NSString *Descrizione;
@end

@interface APPagineSommarioLinee : NSObject
@property (nonatomic, retain) NSString *Description;
@property (nonatomic, assign) int IdLinea;
@end

@interface APPagineSommarioCategorie : NSObject
@property (nonatomic, retain) NSString *Nome;
@property (nonatomic, assign) int DestId;
@property (nonatomic, retain) APPagineSommarioLinee *Linee;
@end

@interface APPagineSommario : NSObject
@property (nonatomic, retain) APPagineSommarioCategorie *Categorie;
@end

@interface APPagine : NSObject
@property (nonatomic, assign) NSString *Layout;
@property (nonatomic, assign) int Indice;
@property (nonatomic, retain) NSString *Titolo;
@property (nonatomic, retain) APPagineMedia *Media;
@property (nonatomic, retain) APPagineDescription *Descrizione;
@property (nonatomic, retain) APPagineSommario *Sommario;
@end

APXmlData.h

@interface APXmlData : NSObject

@property (nonatomic, retain) NSString *Lingua;
@property (nonatomic, assign) float Versione;
@property (nonatomic, assign) long long Timestamp;
@property (nonatomic, retain) APPagine    *Pagine;
@property (nonatomic, retain) APCategorie *Categorie;
@property (nonatomic, retain) APCarousel  *Carousel;

@end

and finally in my controller interface:

#import "APXmlData.h"
@interface APViewController : UIViewController
{
  APXmlData *_XmlData;
}
@end

and in implementation:

_XmlData.Timestamp = 123;
_XmlData.Version = 1.0;
_XmlData.Pagine = [[APPagine alloc] init];
_XmlData.Pagine.Layout = @"a";
_XmlData.Pagine.Indice = 1;
_XmlData.Pagine.Titolo = @"titolo";
//[...]

But,
in when i go to set data to

_XmlData.Pagine = [[APPagine alloc] init];

he returns me a linker error, the classic

Undefined symbols for architecture i386:
“_OBJC_CLASS_$_APPagineDescription”, referenced from:
objc-class-ref in APPagine.o

“_OBJC_CLASS_$_APPagineMedia”, referenced from:
objc-class-ref in APViewController.o
objc-class-ref in APPagine.o

“_OBJC_CLASS_$_APPagineSommario”, referenced from:
objc-class-ref in APPagine.o

ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1
(use -v to see invocation)

My question is: what is correct way to import the classes in my controller?
Should be use #import or @class?
In that order?
What are the classes that require @class or #import?

NOTE

In Build -> Compile Sources, both files are properly configured.
If i remove _XmlData.Pagine = [[APPagine alloc] init]; the apps run well

thanks.

  • 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-13T05:36:11+00:00Added an answer on June 13, 2026 at 5:36 am

    The error you receive is a linker error, not a compiler error, so it looks like your #import was done correctly. Linker errors occur when the program linker cannot find the implementation. I would suggest that you check:

    • That you have the corresponding @implementation in e.g. APPagine.m
    • That APPagine.m is included in the project and active for your target in XCode
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two classes: BaseClass : NSObject AdvanceClass : BaseClass And in AdvanceClass i
I have two classes : import android.cla; public class CW { public static void
I have two classes, one nested in the other. Public Class Operation Public Property
I have two classes in my app, GHHaiku (a subclass of NSObject ) and
I have two classes: GHHaiku and GHViewController . In GHHaiku , I declare @property
I have two classes that each implement an interface. One of the classes contains
I have two classes and an interface like interface IVehicle { void Drive(); }
I have two classes (MVC view model) which inherits from one abstract base class.
I have two classes A and B generated by cxf-codegen-plugin from my WSDL. A
I have two classes Foo and Bar . The tables in the database look

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.