当前位置: 技术问答>linux和unix
linux编译Calculix问题
来源: 互联网 发布时间:2017-05-29
本文导语: 在Linux下编译有限元程序Calculix,已经安装好了数学库SPOOLES和ARPACK。其中ARPACK是用Fortran 77编的,也安装配置了Fortran 77。并且在运行ARPACK的简单算例时也没有出现问题。但是,在编译Calculix时出现了如下问题: ...//类...
在Linux下编译有限元程序Calculix,已经安装好了数学库SPOOLES和ARPACK。其中ARPACK是用Fortran 77编的,也安装配置了Fortran 77。并且在运行ARPACK的简单算例时也没有出现问题。但是,在编译Calculix时出现了如下问题:
...//类似的错误很多
/usr/local/ARPACK/libarpack_linux.a(dsortc.o):dsortc.f:(.text+0x574): more undefined references to `s_cmp' follow
/usr/local/ARPACK/libarpack_linux.a(dnaitr.o): In function `dnaitr_':
dnaitr.f:(.text+0x15f): undefined reference to `second_'
dnaitr.f:(.text+0x3a0): undefined reference to `second_'
dnaitr.f:(.text+0x56f): undefined reference to `second_'
dnaitr.f:(.text+0x5ee): undefined reference to `second_'
dnaitr.f:(.text+0x653): undefined reference to `second_'
/usr/local/ARPACK/libarpack_linux.a(dnaitr.o):dnaitr.f:(.text+0x6d2): more undefined references to `second_' follow
collect2: ld returned 1 exit status
make: *** [ccx_2.7] Error 1
查询网上说要加入lpthread到Makefile文件中的编译命令,尝试了不行。
Makefile文件如下:
CFLAGS = -Wall -O3 -I ../../../SPOOLES.2.2 -DARCH="Linux" -DSPOOLES -DARPACK -DMATRIXSTORAGE
FFLAGS = -Wall -O3
CC=cc
FC=gfortran
.c.o :
$(CC) $(CFLAGS) -c $
...//类似的错误很多
/usr/local/ARPACK/libarpack_linux.a(dsortc.o):dsortc.f:(.text+0x574): more undefined references to `s_cmp' follow
/usr/local/ARPACK/libarpack_linux.a(dnaitr.o): In function `dnaitr_':
dnaitr.f:(.text+0x15f): undefined reference to `second_'
dnaitr.f:(.text+0x3a0): undefined reference to `second_'
dnaitr.f:(.text+0x56f): undefined reference to `second_'
dnaitr.f:(.text+0x5ee): undefined reference to `second_'
dnaitr.f:(.text+0x653): undefined reference to `second_'
/usr/local/ARPACK/libarpack_linux.a(dnaitr.o):dnaitr.f:(.text+0x6d2): more undefined references to `second_' follow
collect2: ld returned 1 exit status
make: *** [ccx_2.7] Error 1
查询网上说要加入lpthread到Makefile文件中的编译命令,尝试了不行。
Makefile文件如下:
CFLAGS = -Wall -O3 -I ../../../SPOOLES.2.2 -DARCH="Linux" -DSPOOLES -DARPACK -DMATRIXSTORAGE
FFLAGS = -Wall -O3
CC=cc
FC=gfortran
.c.o :
$(CC) $(CFLAGS) -c $