我运行了以下代码来安装TRNG:
mkdir build
cd build
cmake ..
make
make install 我认为安装工作是成功的。当我使用这个g++ -o 1.cpp -ltrng4运行我的程序时,它说:
/usr/bin/ld: cannot find -ltrng4
collect2: error: ld returned 1 exit status有人能帮我吗?
发布于 2021-03-22 08:34:57
libtrng4不是Ubuntu包,您的错误表明它没有安装。
建议你从零开始安装它:-
https://github.com/rabauke/trng4安装说明如下:- https://github.com/rabauke/trng4/raw/master/doc/trng.pdf
git clone https://github.com/rabauke/trng4
cd trng4
mkdir build
cd build
cmake ..
make
make install如果所有这些都有效,那么您的编译行应该是:-
g++ -o 1.cpp -L/usr/local/lib -ltrng4
https://askubuntu.com/questions/1325243
复制相似问题