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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:22:22+00:00 2026-05-27T17:22:22+00:00

While compiling I received 2 errors.. Undefined symbols for architecture i386: _IKImageBrowserNSURLRepresentationType, referenced from:

  • 0

While compiling I received 2 errors..

Undefined symbols for architecture i386:

“_IKImageBrowserNSURLRepresentationType”, referenced from:

-[ATDesktopEntity imageRepresentationType] in ATDesktopEntity.o

“.objc_class_name_CABasicAnimation”, referenced from:
pointer-to-literal-objc-class-name in ATColorView.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I’ve included to 2 implementation files where I feel the problem is occurring…

#import "ATDesktopEntity.h"
#import <Quartz/Quartz.h>

#define THUMBNAIL_HIEGHT 180.0
#define DEMO_MODE 0

@implementation ATDesktopEntity

+ (ATDesktopEntity *)entityForURL:(NSURL *)url {

    NSString *typeIdentifier;
    if ([url getResourceValue:&typeIdentifier forKey:NSURLTypeIdentifierKey
        error:NULL]) {
        NSArray *imageUTIs = [NSImage imageTypes];
         if ([imageUTIs containsObject:typeIdentifier]) {
              return [[[ATDesktopImageEntity alloc] initWithFileURL:url] autorelease];
         }else if ([typeIdentifier isEqualToString:(NSString *)kUTTypeFolder]){
              return [[[ATDesktopFolderEntity alloc] initWithFileURL:url] autorelease];
         }
    }
    return nil;
}

@synthesize fileURL = _fileURL;
@dynamic title;

- (id)initWithFileURL:(NSURL *)fileURL
{
    self = [super init];
    _fileURL = [fileURL retain];
    return self;
}

- (id)copyWithZone:(NSZone *)zone
{
    id result = [[[self class] alloc] initWithFileURL:self.fileURL];
    return result;
}

- (NSString *)description
{
     return [NSString stringWithFormat:@"%@ : %@", [super description], self.title];
}

- (void)dealloc
{
    [_fileURL release];
    [super dealloc];
}

- (NSString *)title
{
    NSString *result;
    if ([self.fileURL getResourceValue:&result forKey:NSURLLocalizedNameKey 
         error:NULL]) {
         return result;
    }
    return nil;
}

#pragma mark -
#pragma mark NSPasteboardWriting support

- (NSArray *)writableTypesForPasteboard:(NSPasteboard *)pasteboard
{
    return [self.fileURL writableTypesForPasteboard:pasteboard];
}

- (id)pasteboardPropertyListForType:(NSString *)type
{
   return [self.fileURL pasteboardPropertyListForType:type];
}

- (NSPasteboardWritingOptions)writingOptionsForType:(NSString *)type pasteboard:  
    (NSPasteboard *)pasteboard
{
    if ([self.fileURL respondsToSelector:@selector(writingOptionsForType:pasteboard:)]) 
         {
        return [self.fileURL writingOptionsForType:type pasteboard:pasteboard];
    }else{
        return 0;
    }
}

#pragma mark -
#pragma mark NSPasteboardReading support

+ (NSArray *)readableTypesForPasteboard:(NSPasteboard *)pasteboard 
{
    return [NSArray arrayWithObjects:(id)kUTTypeFolder, (id)kUTTypeFileURL, nil];
}
+ (NSPasteboardReadingOptions)readingOptionsForType:(NSString *)type pasteboard:
    (NSPasteboard *)pasteboard
{
    return NSPasteboardReadingAsString;
}

- (id)initWithPasteboardPropertyList:(id)propertyList ofType:(NSString *)type
{
    [self release];
    self = nil;

    NSURL *url = [[[NSURL alloc] initWithPasteboardPropertyList:propertyList
        ofType:type] autorelease];
    NSString *urlUTI;
    if ([url getResourceValue:&urlUTI forKey:NSURLTypeIdentifierKey error:NULL
        ]) {
        if ([[NSImage imageTypes] containsObject:urlUTI]) {
            self = [[ATDesktopImageEntity alloc] initWithFileURL:url];
        }else if ([urlUTI isEqualToString:(id)kUTTypeFolder]) {

            self = [[ATDesktopFolderEntity alloc] initWithFileURL:url];
        }
    }
    return self;
}

#pragma mark -

- (NSString *)imageUID
{
    return [NSString stringWithFormat:@"%p", self];
}

- (NSString *)imageRepresentationType
{
    return IKImageBrowserNSURLRepresentationType;
}

- (id)imageRepresentation
{
    return self.fileURL;
}

- (NSUInteger)imageVersion
{
    return 0;
}

- (NSString *)imageTitle
{
    return self.title;
}

- (NSString *)imageSubtitle
{
    return nil;
}

- (BOOL)isSelectable
{
    return YES;
}

@end


@interface ATDesktopImageEntity()

@property (readwrite, retain) NSImage *thumbnailImage;

@property (readwrite) BOOL imageLoading;

@end

static NSOperationQueue *ATSharedOperationQueue()
{
    static NSOperationQueue *_ATSharedOperationQueue = nil;
    if (_ATSharedOperationQueue == nil) {
        _ATSharedOperationQueue = [[NSOperationQueue alloc] init];
        [_ATSharedOperationQueue setMaxConcurrentOperationCount:2];
    }
    return _ATSharedOperationQueue;
}

@implementation ATDesktopImageEntity

- (id)initWithFileURL:(NSURL *)fileURL
{
    self = [super initWithFileURL:fileURL];

    static NSInteger lastColorIndex = 0;
    NSColorList *colorList = [NSColorList colorListNamed:@"Crayons"];
    NSArray *keys = [colorList allKeys];
    if (lastColorIndex >= keys.count) {
        lastColorIndex = 0;
    }
    _fillColorName = [[keys objectAtIndex:lastColorIndex++] retain];
    _fillColor = [[colorList colorWithKey:_fillColorName] retain];
    self.title = [super title];
    return self;
}

- (void)dealloc
{
    [_thumbnailImage release];
    [_image release];
    [_fillColor release];
    [_fillColorName release];
    [_title release];
    [super dealloc];
}

@synthesize fillColor = _fillColor;
@synthesize fillColorName = _fillColorName;
@synthesize imageLoading = _imageLoading;
@synthesize image = _image;
@synthesize thumbnailImage = _thumbnailImage;
@synthesize title = _title;

static NSImage *ATThumbnailImageFromImage(NSImage *image)
{
    NSSize imageSize = [image size];
    CGFloat imageAspectRatio = imageSize.width / imageSize.height;

   NSSize thumbnailSize = NSMakeSize(THUMBNAIL_HIEGHT * imageAspectRatio, 
      THUMBNAIL_HIEGHT);
   NSImage *thumbnailImage = [[NSImage alloc] initWithSize:thumbnailSize];
   [thumbnailImage lockFocus];
   [image drawInRect:NSMakeRect(0, 0, thumbnailSize.width, thumbnailSize.
       height) fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
   [thumbnailImage unlockFocus];

#if DEMO_MODE
     usleep(250000);
#endif

    return [thumbnailImage autorelease];
}

- (NSImage *)thumbnailImage
{
    if (self.image != nil && _thumbnailImage == nil) {
        _thumbnailImage = [ ATThumbnailImageFromImage(self.image) retain];
    }else if (self.image == nil && !self.imageLoading) {

        [self loadImage];
    }
    return _thumbnailImage;
}

- (void)loadImage
{
    @synchronized (self) {
        if (self.image == nil && !self.imageLoading) {
            self.imageLoading = YES;

            [ATSharedOperationQueue() addOperationWithBlock:^(void) {
                NSImage *image = [[NSImage alloc] initWithContentsOfURL:self.fileURL];
                if (image != nil) {
                    NSImage *thumbnailImage = ATThumbnailImageFromImage(image);

                    @synchronized (self) {
                        self.imageLoading = NO;
                        self.image = image;
                        self.thumbnailImage = thumbnailImage;
                    }
                    [image release];
                }else{
                    @synchronized (self) {
                        self.image = [NSImage imageNamed:NSImageNameTrashFull];
                    }
                }
            }];
         }
    }
}
@end;


@implementation ATDesktopFolderEntity

- (void)dealloc
{
    [_children release];
    [super dealloc];
}

@dynamic children;

- (NSMutableArray *)children
{
    NSMutableArray *result = nil;

    @synchronized (self) {

        if (_children == nil && self.fileURL != nil) {
            NSError *error = nil;

            NSArray *urls = [[NSFileManager defaultManager]
                             contentsOfDirectoryAtURL:self.fileURL
                           includingPropertiesForKeys:[NSArray
                                     arrayWithObjects:NSURLLocalizedNameKey, nil]
                                              options:        
                                              NSDirectoryEnumerationSkipsHiddenFiles |
                         NSDirectoryEnumerationSkipsSubdirectoryDescendants error:&error];
           NSMutableArray *newChildren = [[NSMutableArray alloc] initWithCapacity:urls.count];

           for (NSURL *url in urls) {
               NSString *typeIndentifier;
               if ([url getResourceValue:&typeIndentifier forKey:
                   NSURLTypeIdentifierKey error:NULL]) {
                   ATDesktopEntity *entity = [ATDesktopEntity entityForURL:url];
                   if (entity) {
                       newChildren addObject:entity];
                   }
               }
            }
            _children = newChildren;
        }
        result = [[_children retain] autorelease];
    }
    return result;
}

- (void)setChildren:(NSMutableArray *)value
{
    @synchronized (self) {
        if (_children != value) {
            [_children release];
            _children = [value retain];
        }
    }
}
@end

NSString *const ATEntityPropertyNamedFillColor = @"fillColor";
NSString *const ATEntityPropertyNamedFillColorName = @"fillColorName";
NSString *const ATEntityPropertyNamedImage = @"image";
NSString *const ATEntityPropertyNamedThumbnailImage = @"thumbnailImage";

Second file..

#import "ATColorView.h"

#import <Quartz/Quartz.h>

@implementation ATColorView

+ (id)defaultAnimationForKey:(NSString *)key{
    if ([key isEqualToString:@"backgroundColor"]) {
        return [CABasicAnimation animation];
    }
    return [super defaultAnimationForKey:key];
}                      

- (void)dealloc
{
    self.backgroundColor = nil;
    [super dealloc];
}

@synthesize backgroundColor;
@synthesize drawBorder;

- (CGColorRef)createBackgroundColorRef
{
    CGFloat components[backgroundColor.numberOfComponents];
    [backgroundColor getComponents:components];
    return CGColorCreate([[backgroundColor colorSpace] CGColorSpace],components);
}

- (void)setBackgroundColor:(NSColor *)value 
{
    if (backgroundColor != value) {
        [backgroundColor release];
        backgroundColor = [value retain];
        if (self.layer == nil) {
            CGColorRef backgroundColorRef = [self createBackgroundColorRef];
            self.layer.backgroundColor = backgroundColorRef;
            CGColorRelease(backgroundColorRef);
        }
        [self setNeedsDisplay:YES];
    }
}

- (void)drawRect:(NSRect)r
{
    NSColor *color = [self backgroundColor];
    if (color) {
        [color set];
        NSRectFill(r);
    }
    if (self.drawBorder) {
       [[NSColor lightGrayColor] set];
       NSFrameRectWithWidth(self.bounds, 1.0);
    }
    if (self.window.firstResponder == self) {
        NSSetFocusRingStyle(NSFocusRingOnly);
        NSRectFill(self.bounds);
    }
}

- (void)mouseUp:(NSEvent *)theEvent
{
   NSPoint point = [self convertPoint:[theEvent locationInWindow] fromView:nil];
  if (NSPointInRect(point, self.bounds) && self.action) {
      [NSApp sendAction:self.action to:self.target];
  }
}

+ (Class)cellClass {
   return [NSActionCell class];
}

@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-05-27T17:22:23+00:00Added an answer on May 27, 2026 at 5:22 pm

    Change the line #import <Quartz/Quartz.h> to #import <QuartzCore/QuartzCore.h>

    Also make sure you have linked those libraries and Frameworks to your project.

    For more info, please check this post

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

Sidebar

Related Questions

I have compilation errors while compiling MySQL sample of storage engine from MySQL 5.1.36
I have a problem while compiling my code ( undefined reference to 'yylex' ).
I'm getting errors while compiling a program that uses threads. Here is the part
While compiling a demo from openni i stumbled across this error: Exception in thread
I've been trying a program from codeproject , about ptr_vector, and while compiling, the
While compiling a program in Java I got this big WARNING warning: [unchecked] unchecked
While Compiling the WPF Application for many times in a day it give following
What we are looking for is: while compiling the same configuration, say Release|Win32, is
I learned that compiler will expand macros while compiling. Templates are also expanded at
I am getting the following error while compiling a sample program in Qt 4.5

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.