2011-06-28 120 views
0

我正在開發幾個iOS應用程序,它們共享一些常見的第三方庫,以及我自己的一些共享代碼。在Xcode 4中,如何創建多共享項目設置?

這是我的文件夾佈局:

- three20/

我所有的應用程序的通用設置:

-Shared/*chibiORM* (ORM layer) 
-Shared/**BaseApp** (This link to chibiORM & three20) 
---------------/Libs/(Several small 3dparty libs) 

此應用程序必須鏈接到BaseApp,並有three20,chibiORM & 3dparty方libs訪問..

- App1 
- App2 
- AppN... 

我知道如何將靜態庫鏈接到單個項目,但未能執行此多鏈接設置,其中BaseApp鏈接到three20,chibiORM,其他實用程序和App1..N鏈接到以前的所有鏈接。

我不想一個接一個(我當前的設置)鏈接到每一個,而是全部在一起去。

我可以編譯好的BaseApp,並且只需將項目/拖放到App1即可)。然後,我把頭文件/框架/庫路徑指向所有這些(我想知道這是否可以簡化爲單一路徑,而不是將5放在這裏),但從BaseApp鏈接的每個lib獲取這些錯誤:

Undefined symbols for architecture i386: 
    "__ALog", referenced from: 
     -[App1AppDelegate closeDb] in App1AppDelegate.o 
     -[App1AppDelegate application:didFinishLaunchingWithOptions:] in App1AppDelegate.o 
     -[BoardViewController cardSelected:indexPath:] in BoardViewController.o 
     -[BoardViewController gestureRecognizerShouldBegin:] in BoardViewController.o 
     -[BoardViewController moveActionGestureRecognizerStateChanged:] in BoardViewController.o 
     -[BoardViewController finishedSnap:finished:context:] in BoardViewController.o 
     -[BoardViewController animationDidStop:finished:context:] in BoardViewController.o 
     ... 
    "_sqlite3_unicode_free", referenced from: 
     -[App1AppDelegate closeDb] in App1AppDelegate.o 
    "_sqlite3_unicode_load", referenced from: 
     -[App1AppDelegate application:didFinishLaunchingWithOptions:] in App1AppDelegate.o 
    "_OBJC_CLASS_$_Db", referenced from: 
     objc-class-ref in App1AppDelegate.o 

這可能嗎?

回答

相關問題