mariel-od

Q: C error:   ld: library not found for -lgcc collect2: error: ld returned 1 exit status

I am trying to compile the basic "Hello World" C code with gcc but the following error appears:

 

 

    ld: library not found for -lgcc

    collect2: error: ld returned 1 exit status

 

 

The code itself it's fine, ran it in another computer without any problems.

 

First installed gcc manually, had the problem, then uninstalled and installed it with homebrew and still have the problem. How can I fix this?

 

 

(Have the 5.1.0 version of gcc)

MacBook Pro (13-inch Mid 2012)

Posted on Sep 26, 2016 9:35 PM

Close

Q: C error:   ld: library not found for -lgcc collect2: error: ld returned 1 exit status

  • All replies
  • Helpful answers