Gfortran does not work on Mac OS X 10.9

I upgraded my Mac to OS X 10.9 GM, and then found that gfortran was not working. When creating any program, it shows:

ld: library not found for -lcrt1.10.5.o
collect2: ld return 1

Does anyone know how I can solve this?

+3
source share
3 answers

, OS X 10.9 /Developer, crt1.10.5.o. Xcode (, Xcode 5.0.1+). , crt1.10.5.o /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/S DKs/MacOSX10.9.sdk/usr/lib. , ld , , . -L .

gfortran ... -L /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/S‌​DKs/MacOSX10.9.sdk/usr/lib/

. .

+4

Gfortran Mac OS X Mavericks 10.9 http://hpc.sourceforge.net/

-, cd Mavericks,

cd /
sudo wget http://prdownloads.sourceforge.net/hpc/gcc-4.9-bin.tar.gz
tar -xvf gcc-4.9-bin.tar.gz

gfortran --help
+3

I had similar problems (ld: library not found for -lcrt0.o), but I found that they were gone when I stopped using the -static flag with the gfortran command. The -static-libgcc flag looks fine.

0
source

Source: https://habr.com/ru/post/1539476/


All Articles