0

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.

1 Answer 1

0

Do we need to install them separately?

You need to install glibc-devel (or similar) package.

1
  • I installed libc6-dev package ...Even then the library didn't exist
    – sahe
    May 16, 2022 at 3:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.