error undefined reference to `_gfortran_concat_string’

I have tried to compile a code in Linux Ubuntu 12.04 (same as Linux Mint 13). When I try to compile this code, I get error message like this :

/usr/lib64/liblapack.a(dgesvd.o): In function `dgesvd_':
(.text+0x3b0): undefined reference to `_gfortran_concat_string'
/usr/lib64/liblapack.a(dgesvd.o): In function `dgesvd_':
(.text+0xe33): undefined reference to `_gfortran_concat_string'
/usr/lib64/liblapack.a(dormbr.o): In function `dormbr_':

This problem showed because we forget to add other library to our Makefile. We can remove this message with add flag “-lgfortran” in our Makefile command. This is a sample method how to add this flag in our Makefile :

Original : -llapack -lfftw
Modified : -llapack -lfftw -lgfortran

We only need to add “-lgfortran“. This method would remove all undefined reference to `_gfortran_concat_string’ error message.

Add a Comment

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.