Sample Header Ad - 728x90

Linker error: /usr/bin/ld: cannot find -lgcc_s

5 votes
1 answer
13355 views
I am trying to compile symlinks (tar.gz-file ), which is a very small tool with one line for compilation: gcc -Wall -Wstrict-prototypes -O2 -N -s -o symlinks symlinks.c which gives the error .... /usr/bin/ld: cannot find -lgcc_s /usr/bin/ld: cannot find -lgcc_s collect2: ld returned 1 exit status The output of /sbin/ldconfig -p | grep libgcc is libgcc_s.so.1 (libc6) => /lib/i386-linux-gnu/libgcc_s.so.1 and trying to include the mentioned directory directly gcc -Wall -Wstrict-prototypes -L /lib/i386-linux-gnu/ -O2 -N -s -o symlinks symlinks.c produces the same error. Three questions: 1. Why does it not work with the first command, as the lib seems to be in the search path 2. Why does including the path itself does not help 3. How to fix this?
Asked by Alex (5848 rep)
Nov 13, 2013, 04:09 PM
Last activity: May 28, 2025, 08:03 PM