在编译 TrueCrypt 时,我得到“对符号 'dlclose@@GLIBC_2.2.5' 的未定义引用”

pcw*_*rld 18 compiling truecrypt 13.04

我正在尝试从 Ubuntu 13.04 上的源代码编译 TrueCrypt 7.1a。但是make在链接过程中失败并出现以下错误:

Linking truecrypt
/usr/bin/ld: /home/user/truecrypt-7.1a-source/tc2/Volume/Volume.a(SecurityToken.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/usr/bin/ld: note: 'dlclose@@GLIBC_2.2.5' is defined in DSO /lib/x86_64-linux-gnu/libdl.so.2 so try adding it to the linker command line
/lib/x86_64-linux-gnu/libdl.so.2: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[1]: *** [truecrypt] Error 1
make: *** [all] Error 2
Run Code Online (Sandbox Code Playgroud)

我该如何解决?

pcw*_*rld 18

将环境变量设置LIBS-ldl

LIBS=-ldl make
Run Code Online (Sandbox Code Playgroud)

  • 我有`ubuntu 14.04`。得到类似的错误 `/usr/bin/ld: CMakeFiles/lmdemo.dir/lmdemo.co: undefined reference to symbol 'exp@@GLIBC_2.2.5'` `//lib/x86_64-linux-gnu/libm.so.6 :添加符号时出错:命令行中缺少 DSO` 你的解决方案对我没有帮助。我该怎么办? (3认同)