所以,我正在構建一個項目,它使用編譯庫(.dylib或.so)中的函數。我在適當位置標頭和庫文件(這是QtRoot的一部分,順便說一句),但是當我嘗試建立我的Xcode項目,我得到一個調試錯誤:鏈接是頂起來的。什麼是-rpath? MacOS X
dyld: Library not loaded: @rpath/libRIO.so Referenced from: /Users/paulthompson/Documents/Programming/Build Products/Debug/MacHeliosSim.app/Contents/MacOS/MacHeliosSim Reason: image not found sharedlibrary apply-load-rules all Data Formatters temporarily unavailable, will re-try after a 'continue'. (Cannot call into the loader at present, it is locked.)
現在,程序如果我從Finder中打開它,它會自己運行得很好,但是每當我嘗試從Xcode運行它時,它都會向我發送消息。這個rpath是什麼東西,爲什麼調試器不能找到這些庫,儘管Xcode本身知道它們在哪裏,顯然當從Finder運行的程序也能找到它們時呢?
你錯過了你的鏈路上的右括號。 – 2010-08-12 17:01:52
正確,它是一個.app包。但是,除非將它們包裝到實際的二進制文件中,否則它們都不在其中。甚至沒有框架目錄... 無論如何,.app是通過從Xcode執行'build'或'build and go'來創建的。在'build&go'的go部分或者我選擇從Xcode中運行時,該錯誤會產生。 .so,我認爲,實際上是.dylib的sym鏈接。我鏈接的一些庫文件是實際的.so文件,其他文件是.dylib。我認爲在某個地方甚至有一些.a,但我可能是錯的。 那麼,我是否會缺少一個 – TraxusIV 2010-08-12 21:28:28
複製文件構建階段? – TraxusIV 2010-08-12 21:29:10