Re: NCL WRAPIT question

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Fri Jun 11 2010 - 06:05:06 MDT

Jeffrey,

A couple of things: If you are using a recent version of NCL, like
5.2.0, I'm not sure if you'll be able to use g77 to compile this code,
and link against NCL libraries which were compiled with gfortran.

That said, I think your error is simply that you need to help WRAPIT
find the "libg2c.xxxx" library.

You might be able to type:

    locate libg2c

to find the library. Note the path, and then use "-L" on the WRAPIT
line to indicate the path:

    WRAPIT -L /path/to/file PotentialIntensity.f

The "/path/to/file" will need to be replaced by the correct path, of
course.

--Mary

On Jun 10, 2010, at 5:20 PM, Dennis Shea wrote:

>
> The following might work:
>
> %> WRAPIT -fPIC PotentialIntensity.f
>
> When posting a question to NCL like this, it is best to indicate
> the NCL version you are using and your system
>
> %> ncl -V
>
> %> uname -a
>
> Also, in this case ... the version of gcc
>
> %> gcc --version
>
>
> On 6/10/10 2:25 PM, JEFFREY JOSEPH WATERS wrote:
>> To Whom it May Concern,
>> After following the NCL tutorial on how to WRAP a Fortran function, I
>> recently tried to WRAP a Fortran77 subroutine (part of the file
>> PotentialIntensity.f) using the -g77 compiler and the following
>> message
>> came up:
>>
>> Entered this statement in the terminal: WRAPIT -g77
>> PotentialIntensity.f
>>
>> Resulting message:
>> WRAPIT Version: 091416
>> COMPILING PotentialIntensity.f
>> LINKING
>> /usr/bin/ld: cannot find -lg2c
>> collect2: ld returned 1 exit status
>> END WRAPIT
>>
>> I don't really know what this message means, but it may have to do
>> with
>> NCL having trouble finding the appropriate library to successfully
>> compile my subroutine file. So, I have 2 questions regarding this
>> issue:
>>
>> 1. What is the significance of this error message?
>> 2. If it is indeed a library issue, what is the library path I need
>> in
>> order for this file to compile. Any feedback is much appreciated.
>> Thanks.
>>
>>
>>
>>
>> Jeff Waters
>> Graduate Student
>> Department of Meteorology
>> Penn State University '11
>>
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Jun 11 06:05:11 2010

This archive was generated by hypermail 2.1.8 : Fri Jun 11 2010 - 09:33:23 MDT