[ncl-install] compiler incompatibility??

Nuss, Wendell (CIV) nuss at nps.edu
Fri Oct 28 16:46:50 MDT 2011


Mary,

Okay it turned out that I had gfortran 4.2.1 installed in /usr/bin using Xcode 4.1 but had to download gfortran 4.6.1 to get the dylib's needed for ncarg. Switched everything over to gfortran 4.6.1 and its happy now.

Thanks for the insights.

Wendell

On Oct 28, 2011, at 3:05 PM, Mary Haley wrote:

> Wendell,
> 
> Try adding "-lgfortran" to the end of your compile line.
> 
> --Mary
> On Oct 28, 2011, at 11:23 AM, Nuss, Wendell (CIV) wrote:
> 
>> Hi,
>> 
>> I've downloaded precompiled NCAR Graphics and want to link the libraries into my code that uses ncarg routines for plotting. Upon trying to link everything I get an error message as noted in the output pasted below. What's the issue?
>> 
>> gfortran -g -o visual_mac visual-new.o    ./setup/setup.a ./setup/maptrans/maptrans.a ./cominput/cominput.a ./utilities/utilities.a ./utilities/satellite/satellite.a ./utilities/obs/obs.a ./utilities/grids/grids.a ./utilities/plotting/plotting.a ./utilities/computation/computation.a ./utilities/conversion/conversion.a ./utilities/operate/operate.a ./analysis/libs/gemlib/gemlib.a ./analysis/libs/linpack/linpack.a -L/Applications/ncl_ncarg-6.0.0.MacOS_10.6_64bit_nodap_gcc421/lib -lncarg -lncarg_gks -lncarg_c -L/usr/X11R6/lib -lX11 -lpng
>> Undefined symbols for architecture x86_64:
>> "__gfortran_os_error", referenced from:
>>     _icfell_ in libncarg.a(icfell.o)
>>     _cpgetc_ in libncarg.a(cpgetc.o)
>>     _pcfopn_ in libncarg.a(pcfopn.o)
>>     _dpgetc_ in libncarg.a(dpgetc.o)
>>     _dpgetr_ in libncarg.a(dpgetr.o)
>>     _dpsetc_ in libncarg.a(dpsetc.o)
>>     _dpsetr_ in libncarg.a(dpsetr.o)
>>     ...
>> ld: symbol(s) not found for architecture x86_64
>> collect2: ld returned 1 exit status
>> 
>> Thanks for any input. I'm running this on IMAC under Lion OS X 10.7 with Xcode 4.1 downloaded and gfortran 4.2.1 installed.
>> 
>> Wendell Nuss
>> 
>> _______________________________________________
>> ncl-install mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-install
> 



More information about the ncl-install mailing list