Apple Mach-O Linker (Id) Ошибка PDColoredProgressView - PullRequest
3 голосов
/ 20 марта 2011

Я пытаюсь использовать PDColoredProgressView отсюда . Это работало, но по какой-то причине XCode решил, что у него его нет, и выбрасывает 27 ошибок Apple Mach-O Linker (Id). А? Кто-нибудь может расшифровать это? Спасибо!

Ld /Users/xxxxxxxx/Library/Developer/Xcode/DerivedData/xxxxx-cqamvgtgfzdealbjtkomtjzxkdgr/Build/Intermediates/xxxxxxx.build/Debug-iphoneos/xxxxx.build/Objects-normal/armv6/xxxxx normal armv6
    cd "/Users/xxxxxxx/Documents/iPhone Apps/xxxxx"
    setenv IPHONEOS_DEPLOYMENT_TARGET 4.0
    setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk -L/Users/xxxxxxxxx/Library/Developer/Xcode/DerivedData/xxxxx-cqamvgtgfzdealbjtkomtjzxkdgr/Build/Products/Debug-iphoneos -F/Users/xxxxxxxxx/Library/Developer/Xcode/DerivedData/xxxxx-cqamvgtgfzdealbjtkomtjzxkdgr/Build/Products/Debug-iphoneos -filelist /Users/xxxxxxxxx/Library/Developer/Xcode/DerivedData/xxxxx-cqamvgtgfzdealbjtkomtjzxkdgr/Build/Intermediates/xxxxx.build/Debug-iphoneos/xxxxx.build/Objects-normal/armv6/xxxxx.LinkFileList -dead_strip -miphoneos-version-min=4.0 -framework UIKit -framework Foundation -framework QuartzCore -o /Users/xxxxxxxxx/Library/Developer/Xcode/DerivedData/xxxxx-cqamvgtgfzdealbjtkomtjzxkdgr/Build/Intermediates/xxxxx.build/Debug-iphoneos/xxxxx.build/Objects-normal/armv6/xxxxx

Undefined symbols for architecture armv6:
  "_CGRectGetMinX", referenced from:
      _addRoundedRectToPath in PDColoredProgressView.o
      _fillRectWithLinearGradient in PDColoredProgressView.o
  "_CGRectGetMinY", referenced from:
      _addRoundedRectToPath in PDColoredProgressView.o
      _fillRectWithLinearGradient in PDColoredProgressView.o
  "_CGContextSetRGBStrokeColor", referenced from:
      -[PDColoredProgressView drawRect:] in PDColoredProgressView.o
  "_CGContextSetLineWidth", referenced from:
      -[PDColoredProgressView drawRect:] in PDColoredProgressView.o
  "_CGContextIsPathEmpty", referenced from:
      _fillRectWithLinearGradient in PDColoredProgressView.o
  "_CGColorSpaceCreateDeviceRGB", referenced from:
      _fillRectWithLinearGradient in PDColoredProgressView.o
  "_CGContextSaveGState", referenced from:
      _addRoundedRectToPath in PDColoredProgressView.o
      _fillRectWithLinearGradient in PDColoredProgressView.o
  "_CGRectGetHeight", referenced from:
      _addRoundedRectToPath in PDColoredProgressView.o
  "_CGContextStrokeRect", referenced from:
      -[PDColoredProgressView drawRect:] in PDColoredProgressView.o
  "_CGContextRestoreGState", referenced from:
      _addRoundedRectToPath in PDColoredProgressView.o
      _fillRectWithLinearGradient in PDColoredProgressView.o
  "_CGContextSetFillColorWithColor", referenced from:
      -[PDColoredProgressView drawRect:] in PDColoredProgressView.o
  "_CGRectGetWidth", referenced from:
      _addRoundedRectToPath in PDColoredProgressView.o
  "_CGContextTranslateCTM", referenced from:
      _addRoundedRectToPath in PDColoredProgressView.o
      _fillRectWithLinearGradient in PDColoredProgressView.o
  "_CGContextScaleCTM", referenced from:
      _addRoundedRectToPath in PDColoredProgressView.o
  "_CGContextSetRGBFillColor", referenced from:
      -[PDColoredProgressView drawRect:] in PDColoredProgressView.o
  "_CGContextMoveToPoint", referenced from:
      _addRoundedRectToPath in PDColoredProgressView.o
      -[PDColoredProgressView drawRect:] in PDColoredProgressView.o
  "_CGContextFillRect", referenced from:
      -[PDColoredProgressView drawRect:] in PDColoredProgressView.o
  "_CGContextClip", referenced from:
      _fillRectWithLinearGradient in PDColoredProgressView.o
      -[PDColoredProgressView drawRect:] in PDColoredProgressView.o
  "_CGContextAddLineToPoint", referenced from:
      -[PDColoredProgressView drawRect:] in PDColoredProgressView.o
  "_CGContextStrokePath", referenced from:
      -[PDColoredProgressView drawRect:] in PDColoredProgressView.o
  "_CGContextAddRect", referenced from:
      _addRoundedRectToPath in PDColoredProgressView.o
  "_CGGradientRelease", referenced from:
      _fillRectWithLinearGradient in PDColoredProgressView.o
  "_CGContextDrawLinearGradient", referenced from:
      _fillRectWithLinearGradient in PDColoredProgressView.o
  "_CGColorSpaceRelease", referenced from:
      _fillRectWithLinearGradient in PDColoredProgressView.o
  "_CGContextAddArcToPoint", referenced from:
      _addRoundedRectToPath in PDColoredProgressView.o
  "_CGGradientCreateWithColorComponents", referenced from:
      _fillRectWithLinearGradient in PDColoredProgressView.o
  "_CGContextClosePath", referenced from:
      _addRoundedRectToPath in PDColoredProgressView.o
ld: symbol(s) not found for architecture armv6
collect2: ld returned 1 exit status

Спасибо!

* Примечание. Я удалил свое имя пользователя и имя приложения из сообщения об ошибке и заменил их на x *

Ответы [ 2 ]

0 голосов
/ 21 января 2012

У вас не установлена ​​библиотека Core Graphics!Добавьте базовую графическую библиотеку, а затем в PDColoredProgressView.h добавьте #import <CoreGraphics/CoreGraphics.h> ..

. Вам также может понадобиться QuartzCore для некоторых вещей, которые вы делаете!armv7 не имеет к этому никакого отношения. Я не знаю, почему они бросили это туда, ха-ха!

0 голосов
/ 15 июня 2011

Из журнала ошибок, я полагаю, вам не хватает настроек архитектуры проекта или библиотеки (в зависимости от того, где вы использовали код выше).Просто добавьте armv6 (или его эквивалентное имя архитектуры) в настройках проекта, и все будет хорошо.

...