问题描述
我正在尝试通过 ifort 在 Mac 上安装一个包,因为它需要 ifort 来编译和运行代码,但我却遇到了错误
ld: library not found for -lSystem
我不知道 oneAPI 是否带有该库。
ifort -O3 -warn all -fpp -free -assume byterecl -heap-arrays -nogen-interface -static-intel /opt/intel/oneapi/compiler/latest/mac/compiler/include generate_inpmat.F90 -o generate_inpmat
解决方法
我通过指向正确的库路径更正了这个错误。 正确的路径在
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib
代替
/opt/intel/oneapi/compiler/latest/mac/compiler/include