Ошибка CocoaLumberjack: символ не найден: _objc_storeStrong

Я относительно новичок в разработке iOS и пытаюсь реализовать ведение журнала CocoaLumberjack.

Я загрузил последний исходный код с https://github.com/robbiehanson/CocoaLumberjack , включил необходимые файлы в свой проект, внес необходимые изменения в код и получаю компоновщик времени выполнения. ошибка, которая следует ниже.

Среда - Xcode 4.2, сборка 4C199, цель проекта - Device = iPad и DeploymentTarget = 4.3. Первоначально проект был написан с использованием функции сохранения / выпуска, поэтому я оставил исходный код как есть, добавив флаг компилятора "-fobjc-arc" для файлов Lumberjack, которые я использую: DDFileLogger.m, DDLog.m и DDTTYLogger.m .

Вывод консоли:

GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Fri Sep 16 06:56:50 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=i386-apple-darwin --target=arm-apple-darwin".tty /dev/ttys001
sharedlibrary apply-load-rules all
target remote-mobile /tmp/.XcodeGDBRemote-10996-56
Switching to remote-macosx protocol
mem 0x1000 0x3fffffff cache
mem 0x40000000 0xffffffff none
mem 0x00000000 0x0fff none
[Switching to process 11779 thread 0x2e03]
[Switching to process 11779 thread 0x2e03]
dyld: lazy symbol binding failed: Symbol not found: _objc_storeStrong
  Referenced from: /var/mobile/Applications/32E4EEB9-765E-4C72-83C8-F5707253AA99/Demo.app/Demo
  Expected in: /usr/lib/libobjc.A.dylib

dyld: Symbol not found: _objc_storeStrong
  Referenced from: /var/mobile/Applications/32E4EEB9-765E-4C72-83C8-F5707253AA99/Demo.app/Demo
  Expected in: /usr/lib/libobjc.A.dylib

warning: Attempting to create USE_BLOCK_IN_FRAME variable with block that isn't in the frame.
(gdb) 

Мой проект инициализирует среду следующим образом, где fileLogger - это переменная экземпляра, определенная в соответствующем файле AppDelegate.h:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    /*
     * Configure the Lumberjack logging framework (we'll use it instead of NSLog)
     */

    // the TTY logger is the Xcode console
    [DDLog addLogger:[DDTTYLogger sharedInstance]];

    // we'll also use a file logger
    fileLogger = [[DDFileLogger alloc] init];
    fileLogger.rollingFrequency = 60 * 60 * 24; // 24 hour rolling
    fileLogger.logFileManager.maximumNumberOfLogFiles = 7;
    [DDLog addLogger:fileLogger];


    // Override point for customization after application launch.
    DDLogInfo(@"didFinishLaunchingWithOptions: entered");

    // create instance of the view controller
    MainViewController *aViewController = [[MainViewController alloc]
                                           initWithNibName:@"MainView" bundle:nil];
    self.mainViewController = aViewController;  // same as: [self setMainViewController:aViewController];
    [aViewController release];

    // Add the main view controller's view to the window and display.
    self.window.rootViewController = self.mainViewController;

    [self.window makeKeyAndVisible];
    return YES;
}

Кто-нибудь сталкивался с этой проблемой и знает решение или обходной путь ? Возможно ли то, что я делаю ... смешав в проекте файлы ARC и не-ARC?

7
задан DCForever 11 February 2014 в 00:10
поделиться