library not found for -lcrt1.10.5.o

Problem : 

When user wants to create an executable targeted for Max OS X 10.4 system on a Mac OS X 10.5 system with 10.4u SDK there may be an error message in linkage stage:

"ld: library not found for -lcrt1.10.5.o"

Environment : 

Mac OS X 10.5
Intel® Fortran Compiler 11.0 Professional Edition for Mac OS* X

Root Cause : 

By default Intel Fortran Compiler 11.0 will link the 10.5 compatible libraries and runtime objects on a Mac OS X 10.5 system. It causes "crt1.10.5.o" which is absent from the 10.4u SDK to be added to the link command.

Resolution : 

Add GNU C/C++ Compiler option "-mmacosx-version-min=10.4" to the compilation command line. The compiler will link the 10.4 compatible libraries and runtime objects, as well as pass -macosx_version_min 10.4 to the linker.
For more complete information about compiler optimizations, see our Optimization Notice.

1 comment

anonymous's picture

Add the following to ~/.profile (for Mac OS X 10.5):

export C_INCLUDE_PATH=/Developer/SDKs/MacOSX10.5.sdk/usr/include

export LIBRARY_PATH=/Developer/SDKs/MacOSX10.5.sdk/usr/lib

Add a Comment

Have a technical question? Visit our forums. Have site or software product issues? Contact support.