我使用以下命令在我的系统上安装了 libmcrypt:-
avinash@ak-pc:~/Documents/network_lab/tut7$ cd libmcrypt-2.5.8
avinash@ak-pc:~/Documents/network_lab/tut7/libmcrypt-2.5.8$ ./configure --prefix=/usr --disable-posix-threads
avinash@ak-pc:~/Documents/network_lab/tut7/libmcrypt-2.5.8$ make
avinash@ak-pc:~/Documents/network_lab/tut7/libmcrypt-2.5.8$ sudo make install
结果,标头转到 /usr/include,而库转到 /usr/lib。现在,当我将 <mcrypt.h> 包含到 .cpp 文件中并使用 libmcrypt 提供的函数时,编译器会宣布
/tmp/ccCot4nH.o: In function `main':
q3.cpp:(.text+0x64): undefined reference to `mcrypt_module_open'
q3.cpp:(.text+0xb9): undefined reference to `mcrypt_generic_init'
q3.cpp:(.text+0xd6): undefined reference to `mcrypt_generic'
q3.cpp:(.text+0x110): undefined reference to `mdecrypt_generic'
q3.cpp:(.text+0x13a): undefined reference to `mcrypt_generic_deinit'
q3.cpp:(.text+0x147): undefined reference to `mcrypt_module_close'
collect2: ld returned 1 exit status
谁能告诉我问题出在哪里?安装过程有问题吗?