libgfortran.so.3: error adding symbols: DSO missing from command line
Hello. I am inexperienced user in linking fortran shared library. I got the following error when compiling a program, any idea what's going wrong ? Thanks for your help.
g++ -g -Wl,--no-as-needed NuXSecData.o NuXSecFunc.o NuXSecComparison.o gVldNuXSec.o -L/home/navds/LocInstall/HEP/GENIE/lib -lGAlgorithm -lGBaryonResonance -lGBase -lGBodekYang -lGCharm -lGCoh -lGDfrc -lGDIS -lGCrossSections -lGDecay -lGElas -lGElFF -lGHEP -lGEVGCore -lGEVGModules -lGEVGDrivers -lGGiBUU -lGHadronTransp -lGFragmentation -lGInteraction -lGLlewellynSmith -lGMEC -lGMessenger -lGNuGamma -lGNuE -lGNtuple -lGNuclear -lGNumerical -lGQPM -lGPDG -lGPDF -lGQEL -lGRES -lGRegistry -lGReinSeghal -lGUtils -lGGeo -lGFluxDrivers -lGVLE -lGVHE -lGMuELoss -lGReWeight -lGNucleonDecay -L/home/navds/LocInstall/HEP/ROOT/lib/root -lGui -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -pthread -lm -ldl -rdynamic -lMinuit -lGeom -lEG -lEGPythia6 -L/home/navds/LocInstall/HEP/PYTHIA6/pythia6428 -lPythia6 /home/navds/LocInstall/HEP/PYTHIA6/pythia6428/pythia6428.o /home/navds/LocInstall/HEP/PYTHIA6/pythia6428/pythia6_common_address.o -L/usr/lib64 -lLHAPDF -L/usr/lib64 -lxml2 -L/usr/local/lib -llog4cpp -lnsl -o /home/navds/LocInstall/HEP/GENIE/bin/gvld_nu_xsec
/bin/ld: /home/navds/LocInstall/HEP/PYTHIA6/pythia6428/pythia6428.o: undefined reference to symbol '_gfortran_transfer_real_write@@GFORTRAN_1.4'
/usr/lib64/libgfortran.so.3: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
My gcc (g++ and gfortran) version: 5.1.1
[navds@F22G580 root] $ locate libgfortran
/usr/lib/gcc/x86_64-redhat-linux/5.1.1/libgfortran.so
/usr/lib/gcc/x86_64-redhat-linux/5.1.1/libgfortran.spec
/usr/lib/gcc/x86_64-redhat-linux/5.1.1/libgfortranbegin.a
/usr/lib/gcc/x86_64-redhat-linux/5.1.1/32/libgfortran.a
/usr/lib/gcc/x86_64-redhat-linux/5.1.1/32/libgfortran.so
/usr/lib/gcc/x86_64-redhat-linux/5.1.1/32/libgfortranbegin.a
/usr/lib64/libgfortran.so.3
/usr/lib64/libgfortran.so.3.0.0
/usr/share/doc/gcc-gfortran/ChangeLog-2002.libgfortran.bz2
/usr/share/doc/gcc-gfortran/ChangeLog-2003.libgfortran.bz2
/usr/share/doc/gcc-gfortran/ChangeLog-2004.libgfortran.bz2
/usr/share/doc/gcc-gfortran/ChangeLog-2005.libgfortran.bz2
/usr/share/doc/gcc-gfortran/ChangeLog-2006.libgfortran.bz2
/usr/share/doc/gcc-gfortran/ChangeLog-2007.libgfortran.bz2
/usr/share/doc/gcc-gfortran/ChangeLog-2008.libgfortran.bz2
/usr/share/doc/gcc-gfortran/ChangeLog-2009.libgfortran.bz2
/usr/share/doc/gcc-gfortran/ChangeLog-2010.libgfortran.bz2
/usr/share/doc/gcc-gfortran/ChangeLog-2011.libgfortran.bz2
/usr/share/doc/gcc-gfortran/ChangeLog-2012.libgfortran.bz2
/usr/share/doc/gcc-gfortran/ChangeLog-2013.libgfortran.bz2
/usr/share/doc/gcc-gfortran/ChangeLog-2014.libgfortran.bz2
/usr/share/doc/gcc-gfortran/ChangeLog.libgfortran.bz2