On 25 June 2012 11:15, Syed Ahsan Ali Bokhari <ahsan.pmd@xxxxxxxxx> wrote: >> Now I linked it using LDFLG = --static-libgfortran in compile option >> file of application. And now the executable gives the following error >> instead of previous. >> >> [root@pmd03 bin]# ./int2lm_seq_v1.18 >> ./int2lm_seq_v1.18: error while loading shared libraries: >> libquadmath.so.0: wrong ELF class: ELFCLASS32 >> [root@pmd03 bin]# I've already answered this question. I can't help you if you ignore my suggestions. The runtime linker is finding the 32-bit version of libgfortran.so.3 but you are trying to run a 64-bit program. There are a number of ways to tell the dynamic linker how to find the right library, see http://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dynamic_or_shared.html#manual.intro.using.linkage.dynamic You need to tell the runtime linker how to find the right library files. Run "ldd ./int2lm_seq_v1.18" and it will show you the file it's using. You need to make it find the right file, that you installed when you installed the newer version of GCC. >> On Thu, Jun 21, 2012 at 10:22 PM, Jonathan Wakely <jwakely.gcc@xxxxxxxxx> wrote: >>> On 21 June 2012 10:18, Syed Ahsan Ali Bokhari wrote: >>>> Yes I have built outside the source directory in objdir, >>> >>> Then you don't need to delete the srcdir. >>> >>>> I am trying >>>> to build it again because the application which is using gfortran is >>>> not working after the previous build. >>> >>> The error you showed in an earlier mail is because you didn't link the >>> application properly, not because of a problem with the GCC build. >>> >>> Instead of building GCC again why not just link the application properly? >> >> >> >> -- >> Engr. Syed Ahsan Ali Bokhari >> Electronic Engineer (EE) >> Research & Development Division >> Pakistan Meteorological Department H-8/2, Islamabad. >> Phone # off +92518358714 >> Cell # +923155145014 >> www.pmd.gov.pk > > > > -- > Engr. Syed Ahsan Ali Bokhari > Electronic Engineer (EE) > Research & Development Division > Pakistan Meteorological Department H-8/2, Islamabad. > Phone # off +92518358714 > Cell # +923155145014 > www.pmd.gov.pk