2012-01-24 35 views
1

我構建在HP-UX ia64系統上。在構建過程中,出現錯誤圖書館依賴關係不知所云

ld: Can't find dependent library "libnnz10.so" 

無法在我的makefile中鏈接到此庫。該庫位於/databases/oracle10.2.0_64BIT/lib目錄中。我有兩個源文件ora8ibulk.cpp和ora8idplinit.cpp。在構建期間發出的命令是

aCC -DUSE_NEW_IOSTREAMS -AA -mt -z -ext +w -Wc,-ansi_for_scope,on +W302 +W392 +We400 +W2009 +W2193 +W2261 +W4227 +W4255 -DACE_HAS_THREADS -D_POSIX_C_SOURCE=199506L -DHPUX_VERS=1100 -DACE_LACKS_PRAGMA_ONCE +DD64 +DSitanium2 +O2 +Ofltacc +DD64 +DSitanium2 -DPM_64BIT -DFD_SETSIZE=60000 -D__ACE_INLINE__ -DRW_NO_STL -DRW_NO_BOOL -DINFA_PREFIX -DUNIX -DHPUX_IPF -I. -I/export/home/builds/Debug_9.5.0/mercury/native/default/ORACLE/10.1_A/HP-UX.IPF.64/rdbms/demo -I/export/home/builds/Debug_9.5.0/mercury/native/default/ORACLE/10.1_A/HP-UX.IPF.64/rdbms/public -I/export/home/builds/Debug_9.5.0/mercury/native/default/ORACLE/10.1_A/HP-UX.IPF.64/network/public -I/export/home/builds/Debug_9.5.0/mercury/native/default/ORACLE/10.1_A/HP-UX.IPF.64/plsql/public -I/export/home/builds/Debug_9.5.0/mercury/ws/platform/dbadapters/src/pmorabulk/include -I/export/home/builds/Debug_9.5.0/mercury/ws/platform/dbadapters/include -I/export/home/builds/Debug_9.5.0/mercury/native/default/base/409/HP-UX.IPF.64-DEVEL/include -I/export/home/builds/Debug_9.5.0/mercury/native/default/cmnutils/409/HP-UX.IPF.64-DEVEL/include -I/export/home/builds/Debug_9.5.0/mercury/native/default/ICU/3.2.1_D/HP-UX.IPF.64/include -I/export/home/builds/Debug_9.5.0/mercury/native/default/ACE/5.4.7_B/HP-UX.IPF.64 -I/export/home/builds/Debug_9.5.0/mercury/native/default/STLPORT_INCLUDE/4.6.2_A/HP-UX.IPF.64 -I/export/home/builds/Debug_9.5.0/mercury/native/default/STLPORT_INCLUDE/4.6.2_A/HP-UX.IPF.64/stlport -I/opt/aCC/include/iostream \ 
    -c /export/home/builds/Debug_9.5.0/mercury/ws/platform/dbadapters/src/pmorabulk/ora8ibulk.cpp -o ../../target/pmorabulk/tmp/HP-UX.IPF.64.r/ora8ibulk.o 

aCC -DUSE_NEW_IOSTREAMS -AA -mt -z -ext +w -Wc,-ansi_for_scope,on +W302 +W392 +We400 +W2009 +W2193 +W2261 +W4227 +W4255 -DACE_HAS_THREADS -D_POSIX_C_SOURCE=199506L -DHPUX_VERS=1100 -DACE_LACKS_PRAGMA_ONCE +DD64 +DSitanium2 +O2 +Ofltacc +DD64 +DSitanium2 -DPM_64BIT -DFD_SETSIZE=60000 -D__ACE_INLINE__ -DRW_NO_STL -DRW_NO_BOOL -DINFA_PREFIX -DUNIX -DHPUX_IPF -I. -I/export/home/builds/Debug_9.5.0/mercury/native/default/ORACLE/10.1_A/HP-UX.IPF.64/rdbms/demo -I/export/home/builds/Debug_9.5.0/mercury/native/default/ORACLE/10.1_A/HP-UX.IPF.64/rdbms/public -I/export/home/builds/Debug_9.5.0/mercury/native/default/ORACLE/10.1_A/HP-UX.IPF.64/network/public -I/export/home/builds/Debug_9.5.0/mercury/native/default/ORACLE/10.1_A/HP-UX.IPF.64/plsql/public -I/export/home/builds/Debug_9.5.0/mercury/ws/platform/dbadapters/src/pmorabulk/include -I/export/home/builds/Debug_9.5.0/mercury/ws/platform/dbadapters/include -I/export/home/builds/Debug_9.5.0/mercury/native/default/base/409/HP-UX.IPF.64-DEVEL/include -I/export/home/builds/Debug_9.5.0/mercury/native/default/cmnutils/409/HP-UX.IPF.64-DEVEL/include -I/export/home/builds/Debug_9.5.0/mercury/native/default/ICU/3.2.1_D/HP-UX.IPF.64/include -I/export/home/builds/Debug_9.5.0/mercury/native/default/ACE/5.4.7_B/HP-UX.IPF.64 -I/export/home/builds/Debug_9.5.0/mercury/native/default/STLPORT_INCLUDE/4.6.2_A/HP-UX.IPF.64 -I/export/home/builds/Debug_9.5.0/mercury/native/default/STLPORT_INCLUDE/4.6.2_A/HP-UX.IPF.64/stlport -I/opt/aCC/include/iostream \ 
    -c /export/home/builds/Debug_9.5.0/mercury/ws/platform/dbadapters/src/pmorabulk/ora8idplinit.cpp -o ../../target/pmorabulk/tmp/HP-UX.IPF.64.r/ora8idplinit.o 

aCC +DD64 +DSitanium2 -b -Wl,+s -z -mt ../../target/pmorabulk/tmp/HP-UX.IPF.64.r/ora8ibulk.o ../../target/pmorabulk/tmp/HP-UX.IPF.64.r/ora8idplinit.o \ 
     -o ../../target/bin/HP-UX.IPF.64.r/libpmorablk.sl \ 
     -L/export/home/builds/Debug_9.5.0/mercury/native/default/ORACLE/10.1_A/HP-UX.IPF.64/lib -lclntsh \ 

ld: Can't find dependent library "libnnz10.so" 

從哪裏對libnnz10.so進行此依賴?在拍攝自己之前請幫忙。

回答

1

東西列出了libnnz10.so作爲一個庫(正如你猜測的那樣)。要找到它對包含的庫運行'ldd',請繼續這樣做,直到找到需要的libnnz10.so。

+0

你是對的,我連接到libclntsh.so,這個庫需要libnnz.so。但是這兩個庫都位於/databases/oracle10.2.0_64BIT/lib中,並且此目錄位於$ SHLIB_PATH變量中。那爲什麼不能加載libnnz.so? –

+0

您沒有爲編譯器指定-L/databases/oracle10.2.0_64BIT/lib。 SHLIB_PATH(我假設它類似於Linux上的LD_LIBRARY_PATH或OSX上的DYLD_LIBRARY_PATH) - 只會告訴執行程序在哪裏查找庫。您的編譯器只會查看其sys目錄中的目錄,或者您明確地告訴它查找。 – synthesizerpatel