Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
358 views
in Technique[技术] by (71.8m points)

macos - How to use ifort in mac osx

I have a problem compiling a program with Intel fortran on my Mac. I have a makefile in a folder and when I use make command, I get the following error:

ld: library not found for -lcrt1.10.6.o 
make: *** [../BIN/double_par_TMATRIX] Error 1 

I found this link which mentions a possible solution, but I don't know how to apply it.

https://software.intel.com/en-us/articles/library-not-found-for-lcrt1105o

According to this link, the solution is to Add GNU C/C++ compiler option -mmacosx-version-min=10.4 to the compilation command line. But i don't know what this solution means exactly.

I have mac os x 10.9.5 and I have xcode 5.1.1 installed on it. Do anyone knows how should I add this option?

Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You want to add the -mmacosx-version-min=... option to flags. I'm guessing you want to do -mmacosx-version-min=10.9 because you're on OSX 10.9.5. So you should end up with:

ifeq ($(compilemode),release)
  flags   := $(flags_1) -parallel -openmp -O3 -xT -axT 
else
  flags   := $(flags_1)
endif
flags += -mmacosx-version-min=10.9

UPDATE: Try commenting out or removing your line calling ld. It doesn't look like it belongs there:

ld -mmacosx-version-min=10.6

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...