ld cannot find -lc

When I compile my file with make I get this error:


/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status

The issue comes whenever I compile with the “-static” flag. The only headers I am including are from the standard library.

You need glibc-devel-static

Solved this issue also on my side.
Many thanks.