问题
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