linux - 未定义对 `for_simd_random_number' 的引用

标签 linux fortran undefined-reference

最近,当我尝试在 Linux 上使用 intel 编译器版本 11.1.073 编译 fortran 代码时,遇到以下错误:

>>> BUILDING: PaSR
make[1]: Entering directory `/autofs/na3_home1/xl/ISAT_V11/PaSR'
ftn -O2 -fPIC -I../isatab_ser -I../isat-ck -I../ice-pic -c pasr.f
ftn -O2 -fPIC -I../isatab_ser -I../isat-ck -I../ice-pic -c pasrsubs.f
ftn -O2 -fPIC -I../isatab_ser -I../isat-ck -I../ice-pic -c usrate.f
ftn -o PaSR pasr.o pasrsubs.o usrate.o -Bstatic -L/ccs/home/xl/ISAT_V11/lib 
-lisat7_ser -lck_ext -llapack -Bstatic
/ccs/home/xl/ISAT_V11/lib/libisat7_ser.a(ci_ice_pic_bound.o): In 
function `ci_ice_pic_bound_test_':
ci_ice_pic_bound.f90:(.text+0x34f): undefined reference to `for_simd_random_number'
/usr/bin/ld: link errors found, deleting executable `PaSR'
make[1]: *** [PaSR] Error 1
make[1]: Leaving directory `/autofs/na3_home1/xl/ISAT_V11/PaSR'
make: *** [build-programs] Error 1

在我看来,代码找不到它需要的特定库(在英特尔共享库中),从而导致错误。我已经成功使用intel/13.1.3.192编译它。但不适用于 intel/11.1.073。我在网上搜索了“for_simd_random_number”,但没有找到任何线索。

请献出你的智慧。我很感激!

最佳答案

符号 for_simd_random_number 是在 intel fortran 13 的库 ifcore 中定义的。但是,它不存在于您的 intel fortran 11 库中,因此您无法再次链接它。

关于linux - 未定义对 `for_simd_random_number' 的引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22904383/

相关文章:

linux - Wordpress 本地主机插件安装

linux - 为什么无法删除文件?

c - 使 visual studio FORTRAN-C 混合代码 gfortran-gcc 兼容的最小修改

c++ - CLion 中的 undefined reference

linux - X11/XCB/Xlib : Copy root window to pixmap

linux - 强制 Base 10 在 BASH 中工作不正常

fortran - 在 OpenMP 区域内调用内部子程序

python - 使用 c_iso_binding 和 cython 用 fortran 创建一个 python 包

linux - 如何解决共享库中 undefined reference ?

c - 没有引用 pthread_mutex_lock 编译 -lpthread