我有一個嚴重依賴OpenCV庫的iPhone應用程序;因此,我編譯了這個庫的靜態版本,以便與我的應用程序一起使用。這樣做的說明相對簡單:Using OpenCV on iPhone。我遇到的唯一問題是將連接器標記STANDARD_C_PLUS_PLUS_LIBRARY_TYPE
設置爲「standard
」。該應用程序編譯和運行在OS 2.0和2.2下完美。在iPhone SDK 3.0中鏈接靜態庫
升級到SDK 3.0並嘗試重新編譯我的應用程序後,我遇到了此鏈接程序標誌的問題。
LD:當鏈接我得到這個錯誤沒有找到-lstdC++庫 - 靜態
這也是有趣的是,我的系統上「的libstdC++ - 靜」的存在似乎每一個的iPhoneOS和iPhoneSimulator下SDK除iPhoneOS.platform/SDKs/iPhoneOS3.0.sk外。以下是搜索結果:
$ locate libstdc++-static
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/usr/lib/libstdc++-static.a
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.1.sdk/usr/lib/libstdc++-static.a
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.2.1.sdk/usr/lib/libstdc++-static.a
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.2.sdk/usr/lib/libstdc++-static.a
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/usr/lib/libstdc++-static.a
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.1.sdk/usr/lib/libstdc++-static.a
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.2.1.sdk/usr/lib/libstdc++-static.a
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.2.sdk/usr/lib/libstdc++-static.a
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/usr/lib/libstdc++-static.a
/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libstdc++-static.a
/Developer/SDKs/MacOSX10.5.sdk/usr/lib/libstdc++-static.a
/usr/lib/libstdc++-static.a
我很困惑,一直沒能在Google或iPhone開發論壇上找到任何答案。我真的很感激,如果有人能在這裏闡明一些亮光。
謝謝!
什麼版本的libstdC++在OS 3.x中? – 2009-09-09 23:37:27