f951 error: unrecognized command line option

Deadly 提交于 2021-02-19 07:10:47

问题


I am on linux and I am compiling the following:

mpif90 -shared source.F90 object1.o object2.o -L/some/path -Qoption,link,-rpath=/some/path -I/some/path -lhdf5 -lhdf5_fortran -fPIC -fpp -DDECDEC_ -DMSMS_  -cxxlib-gcc -o libhdfwrapper.so

and I get

f95: unrecognized option '-Qoption,link,-rpath=/some/path'
f95: unrecognized option '-cxxlib-gcc'
f951: error: unrecognized command line option "-fpp"

can anybody tell me why fpp is not recognized?


回答1:


-fpp is a flag used by some compilers, notably Solaris Studio. Also -rpath seems to point to Solaris Studio. It seems you are using gfortran or some other compiler, however. Other compilers use -cpp instead. The same holds for the other options.

Also, the part -Qoption,link,-rpath=/some/path is probably not in the right format.

You may want to consult http://www.oracle.com/technetwork/server-storage/solarisstudio/documentation/oss-translate-gfortran-180584.pdf and your compiler's manual.



来源:https://stackoverflow.com/questions/15897861/f951-error-unrecognized-command-line-option

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!