1
我正在嘗試對他爲我們編寫的一些定製軟件進行反向工程,以前的員工的構建過程。我已經看到所有的東西都可以編譯好,但是我在鏈接過程中遇到了一個錯誤,指出加密++的問題。任何線索?使用ANT加密++鏈接器錯誤
compile.util:
compile:
[echo] Compiling: util
[cc] Starting dependency analysis for 55 files.
[cc] 55 files are up to date.
[cc] 0 files to be recompiled from dependency analysis.
[cc] 0 total files to be compiled.
link.util:
link:
[echo] Linking shared library: libutil
[cc] 0 total files to be compiled.
[cc] Starting link
[cc] /usr/bin/ld: /home/john/softwarename/thirdparty/crypto/5.6.1_64/libcryptopp.a(cryptlib.o): relocation R_X86_64_32 against `CryptoPP::DEFAULT_CHANNEL' can not be used when making a shared object; recompile with -fPIC
[cc] /home/john/softwarename/thirdparty/crypto/5.6.1_64/libcryptopp.a: could not read symbols: Bad value
[cc] collect2: ld returned 1 exit status
BUILD FAILED
/home/john/softwarename/build/build.xml:167: Following error occured while executing this line
/home/john/softwarename/build/link.xml:27: gcc failed with return code 1
操作系統是Fedora的11
經過進一步調查,我認爲我的ANT構建文件期望在我的加密目錄中有一個'libcryptopp.so'。但是在下載crypto ++源文件並運行make之後,它會創建一堆.o文件和一個libcryptopp.a文件。我如何獲得我需要的libcryptopp.so文件?我是GCC和ANT的新手,很抱歉,如果這聽起來像一個noob編譯問題。 – 2010-10-14 19:41:57
在crypto目錄下的makefile中,在'CXXFLAGS'的末尾添加'-fPIC',然後執行'make clean'並重試。 – 2010-10-14 20:07:10