嗨,我正在尝试在 Ubuntu 20.04 中使用 gcc 10.2 编译一个 c 项目。 但最后它给了我如下错误
/usr/bin/ld: cannot find /usr/lib/x86_64-linux-gnu/libpthread_nonshared.a
collect2: error: ld returned 1 exit status
下面是我在创建 so 文件时尝试链接的库
-lpthread -ldl -lm -lstdc++ -lrt
当我查看 /usr/lib64 时,我只能看到 *.so 文件,但看不到 *.a 文件。
需要单独安装吗?
有人可以帮忙吗。
需要单独安装吗?
您需要安装
glibc-devel
(或类似)软件包。