错误:无法识别的命令行选项' -J '

时间:2020-12-18 23:17:01

I am getting this error after executing the corresponding Makefile of the worhp optimization library:

在执行worhp优化库的相应Makefile后,我得到了这个错误:

[root@slave1 worhp]# make
gcc -O -Iinclude -Ifinclude/worhp -Jobj obj/c-example.o -Llib -lworhp -o 
bin/c-example -Wl,-rpath=../lib
gcc: error: unrecognized command line option ‘-J’
make: *** [c-example] Error 1

Taking a look at the Makefile, that option seems to be a gfortran option:

看看Makefile,这个选项似乎是gfortran选项:

# Fortran compiler and flags
FC       := gfortran
FFLAGS   := $(FLAGS) -Ifinclude/worhp -Jobj

I am using gcc 4.9.2 and gfortran 4.8.5-11

我正在使用gcc 4.9.2和gfortran 4.5 -11

1 个解决方案

#1


1  

At the end, what happened to me is that I had previously updated gcc in my machine but not gfortran. So I reinstalled gcc making sure that I added this to the configure step:

最后,发生在我身上的事情是,我之前在我的机器中更新了gcc,而不是gfortran。所以我重新安装了gcc确保我将这个添加到配置步骤中:

--enable-languages=c,c++,fortran

Now both gcc and gfortran have the same version and this error is not produced anymore.

现在gcc和gfortran都有相同的版本,并且不再产生这个错误。

#1


1  

At the end, what happened to me is that I had previously updated gcc in my machine but not gfortran. So I reinstalled gcc making sure that I added this to the configure step:

最后,发生在我身上的事情是,我之前在我的机器中更新了gcc,而不是gfortran。所以我重新安装了gcc确保我将这个添加到配置步骤中:

--enable-languages=c,c++,fortran

Now both gcc and gfortran have the same version and this error is not produced anymore.

现在gcc和gfortran都有相同的版本,并且不再产生这个错误。