<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
Hi,<div><br></div><div>I think you need a -lgfortran at the end of the compile line.</div><div><br></div><div>Please see: <a href="http://www.ncl.ucar.edu/FAQ/#misc_003">http://www.ncl.ucar.edu/FAQ/#misc_003</a></div><div><br></div><div>--Mary</div><div><br></div><div><div><br></div><div><br></div><div><div>On Mar 2, 2009, at 1:13 PM, Richard Hewston wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"> I have downloaded the NCL5.0.0 binaries and they lie under /usr/local/ncl5 <br> <br> When I try to run the sample NCL script (ng4ex gsun01n) it works fine.<br> However, the ncarg sample produces errors:<br> <br> root@rhewston bin]# ncargex cpex08 <br> NCAR Graphics Fortran Example <cpex08><br> <br> Copying cpex08.f<br> <br> Copying cpexcc.f<br> <br> Compiling and linking...<br> gfortran -fPIC -O -o cpex08 cpexcc.f cpex08.f -L/usr/local/ncl5/lib -L/usr/X11R6/lib64 -lncarg -lncarg_gks -lncarg_c -L/usr/X11R6/lib64 -lX11 -lXext <br> /usr/local/ncl5/lib/libncarg.a(cpcldm.o): In function `cpcldm_': <br> cpcldm.f:(.text+0x7eb): undefined reference to `_gfortran_copy_string' <br> cpcldm.f:(.text+0xa20): undefined reference to `_gfortran_pow_r4_i4' <br> ....etc....<br> gzputs.f:(.text+0xd3): undefined reference to `_gfortran_copy_string'<br> gzputs.f:(.text+0x146): undefined reference to `_gfortran_copy_string'<br> /usr/local/ncl5/lib/libncarg_gks.a(gzopwk.o):gzopwk.f:(.text+0x471): more undefined references to `_gfortran_copy_string' follow<br> collect2: ld returned 1 exit status<br> <br> There is no /usr/X11R6/ directory so i tried to changes links (and add the libgfortran link too), but this also produced errors.<br><p><font color="#000000"># gfortran -O -o cpex08 cpexcc.f cpex08.f -L/usr/local/ncl5/lib -lncarg -lncarg_gks -lncarg_c </font><font color="#000000">-L/usr/lib64 </font><font color="#000000">-lX11 -lXext -lgfortran <br> /usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../lib64/crt1.o: In function `_start': <br> (.text+0x20): undefined reference to `main' <br> /usr/local/ncl5/lib/libncarg.a(cpcldm.o): In function `cpcldm_': <br> cpcldm.f:(.text+0x7eb): undefined reference to `_gfortran_copy_string' <br> cpcldm.f:(.text+0xa20): undefined reference to `_gfortran_pow_r4_i4' <br> cpcldm.f:(.text+0xa8f): undefined reference to `_gfortran_pow_r4_i4' <br> cpcldm.f:(.text+0xdb6): undefined reference to `_gfortran_copy_string' <br> cpcldm.f:(.text+0xe35): undefined reference to `_gfortran_copy_string' <br> cpcldm.f:(.text+0xef3): undefined reference to `_gfortran_copy_string' <br> cpcldm.f:(.text+0xfca): undefined reference to `_gfortran_copy_string' <br> cpcldm.f:(.text+0x104e): undefined reference to `_gfortran_copy_string' <br> /usr/local/ncl5/lib/libncarg.a(cpcldm.o):cpcldm.f:(.text+0x10da): more undefined references to `_gfortran_copy_string' follow <br> /usr/local/ncl5/lib/libncarg.a(cppkcl.o): In function `cppkcl_': <br> cppkcl.f:(.text+0x451): undefined reference to `_gfortran_pow_r4_i4' <br> cppkcl.f:(.text+0x518): undefined reference to `_gfortran_pow_r4_i4' <br> cppkcl.f:(.text+0x54a): undefined reference to `_gfortran_pow_r4_i4' <br> cppkcl.f:(.text+0x733): undefined reference to `_gfortran_copy_string' <br> </font></p><p><font color="#000000">... etc...<br> gzputs.f:(.text+0x62): undefined reference to `_gfortran_copy_string'<br> gzputs.f:(.text+0xd3): undefined reference to `_gfortran_copy_string'<br> gzputs.f:(.text+0x146): undefined reference to `_gfortran_copy_string'<br> /usr/local/ncl5/lib/libncarg_gks.a(gzopwk.o):gzopwk.f:(.text+0x471): more undefined references to `_gfortran_copy_string' follow<br> collect2: ld returned 1 exit status<br> </font></p> <font color="#000000">Am I missing anything obvious?!<br> Thanks,<br> Rich</font><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">ncl-install mailing list</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">List instructions, subscriber options, unsubscribe:</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-install">http://mailman.ucar.edu/mailman/listinfo/ncl-install</a></div> </blockquote></div><br></div></body></html>