Reputation: 1
Hi I'm trying to compile a c project with gcc 10.2 in Ubuntu 20.04. But at the end it gives me error as below
/usr/bin/ld: cannot find /usr/lib/x86_64-linux-gnu/libpthread_nonshared.a
collect2: error: ld returned 1 exit status
Below are the libraries I'm trying to link while creating a so file
-lpthread -ldl -lm -lstdc++ -lrt
When i looked into /usr/lib64 i could see only *.so files but no *.a files.
Do we need to install them separately?
Could someone help with this.
Upvotes: 0
Views: 9087
Reputation: 213879
Do we need to install them separately?
You need to install glibc-devel
(or similar) package.
Upvotes: 0