<div>Hi NCL list,</div><div><br></div><div>I have a problem compiling the NCAR graphics.</div><div>I downloaded the binary for 64 bit machine running ubuntu:</div><div>ncl_ncarg-5.2.1.Linux_Debian_x86_64_gcc412.tar.gz</div>
<div><br></div><div>However my gcc/gfortran version is 4.4.3, much newer, so when I run:</div><div>$ ncargex cpex08 -clean</div><div>NCAR Graphics Fortran Example <cpex08></div><div><br></div><div> Copying cpex08.f</div>
<div><br></div><div> Copying cpexcc.f</div><div><br></div><div>Compiling and linking...</div><div>gfortran -fPIC -fno-second-underscore -fno-range-check -O -o cpex08 cpexcc.f cpex08.f -L/home/saulo/NCL/lib -lncarg -lncarg_gks -lncarg_c -lX11 -lXext -lgfortran</div>
<div><br></div><div>I get a bunch of this error:</div><div><br></div><div>/home/saulo/NCL/lib/libncarg.a(mdgetc.o): In function `mdgetc_':</div><div>mdgetc.f:(.text+0x8d): undefined reference to `_gfortran_copy_string'</div>
<div><br></div><div>I google solutions to this from the ncl list and it was suggested that getting libgfortran.so.1 and linking it to gcc/lib/libgfortran.so could do the trick.</div><div>I did that but now the compiler complains about a reference that is in the newer gcc/gfortran version:</div>
<div><br></div><div>/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/crt1.o: In function `_start':</div><div>(.text+0x20): undefined reference to `main'</div><div>/tmp/ccM2T3gF.o: In function `MAIN__':</div>
<div>cpex08.f:(.text+0x4d5): undefined reference to `_gfortran_set_options'</div><div>collect2: ld returned 1 exit status</div><div><br></div><div>The compile and link failed.</div><div><br></div><div>Does anyone knows a solution to this? Or do I have to compile from source?</div>
<div>Or is it possible to make the gcc symbolic link /usr/lib/gcc/x86_64-linux-gnu/4.4/libgfortran.so point to 2 different libraries (link to both libgfortran.so.1 and libgfortran.so.3) at the same time?</div><div><br></div>
<div>Thanks!!</div><div>Aloha</div><div>Saulo Soares</div><div>Phd candidate</div><div>Dept Oceanography</div><div>University of Hawaii at Manoa</div>