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