Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29010 Discussions

undefined reference to `for_cpystr' etc..... SUSE 10.3 Intel fortran 11.1

allandupont
Beginner
1,677 Views
I am getting the following error messages when trying to link an image.
The objects are in a library - this is a fragment of the errors
In function `yesno_p_gen_':
temp/yesno_p_gen.for:(.text+0x54): undefined reference to `for_concat'
temp/yesno_p_gen.for:(.text+0x133): undefined reference to `for_cpstr'
temp/yesno_p_gen.for:(.text+0x157): undefined reference to `for_cpstr'
temp/yesno_p_gen.for:(.text+0x17c): undefined reference to `for_cpystr'
temp/yesno_p_gen.for:(.text+0x2a7): undefined reference to `for_cpstr'
temp/yesno_p_gen.for:(.text+0x2cb): undefined reference to `for_cpstr'

I presume I need to link in a fortran library

the modules were put in the library with this routine.

ifort $1.for -c
ar r asdsm.a $1.o
rm $1.o

the image is created via ingres abf; the library asdsm is linked in via the abf options file.

Thanks in advance for any help
0 Kudos
1 Reply
TimP
Honored Contributor III
1,677 Views
Yes, those references require linking the Intel Fortran run-time libraries. If you use the ifort to run the link, it will include those libraries automatically. So, one way of discovering the necessary -l options is to make a test program and link it by 'ifort -# .....' so as to get the full list of commands which go to the linker. Another is to comb through the libraries in the ifort installation by commands such as 'nm *.a | grep for_cp'
0 Kudos
Reply