|
本帖最后由 发光 于 2021-9-8 15:15 编辑
各位老师,中午好:
安装BLAS成功,按照网上的步骤(先安装BLAS,再安装CBLAS, 最后安装LAPACK)安装CBLAS时,编译(make)报错:(centOS7, 虚拟机)
gfortran -o xscblat1 c_sblat1.o c_sblas1.o ../lib/cblas_LINUX.a libblas.a
../lib/cblas_LINUX.a(cblas_srotg.o):在函数‘cblas_srotg’中:
cblas_srotg.c:(.text+0x1):对‘srotg_’未定义的引用
../lib/cblas_LINUX.a(snrm2sub.o):在函数‘snrm2sub_’中:
snrm2sub.f:(.text+0x7):对‘snrm2_’未定义的引用
../lib/cblas_LINUX.a(scnrm2sub.o):在函数‘scnrm2sub_’中:
scnrm2sub.f:(.text+0x7):对‘scnrm2_’未定义的引用
collect2: 错误:ld 返回 1
make[1]: *** [xscblat1] 错误 1
make[1]: 离开目录“/usr/local/src/CBLAS/testing”
make: *** [alltst] 错误 2
Makefile.in文件内容如下:
#-----------------------------------------------------------------------------
# Platform
#-----------------------------------------------------------------------------
PLAT = LINUX
#-----------------------------------------------------------------------------
# Libraries and includs
#-----------------------------------------------------------------------------
BLLIB = libblas.a
CBLIB = ../lib/cblas_$(PLAT).a
#-----------------------------------------------------------------------------
# Compilers
#-----------------------------------------------------------------------------
CC = gcc
FC = gfortran
LOADER = $(FC)
#-----------------------------------------------------------------------------
# Flags for Compilers
#-----------------------------------------------------------------------------
CFLAGS = -O3 -DADD_
FFLAGS = -O3
#-----------------------------------------------------------------------------
# Archive programs and flags
#-----------------------------------------------------------------------------
ARCH = ar
ARCHFLAGS = r
RANLIB = echo
中间我尝试BLLIB = libblas.a 改为 =/usr/local/lib/ libblas.a, 一样的报错,希望各位老师解惑,感谢
|
|