Subject: Re: Fortran program error message
From: marco atzeri <[email-masked]>
To: [email-masked]
Cc: Gery Herbozo Jimenez <[email-masked]>
Date: Mon, 28 Feb 2011 15:51:36 +0100
List-Id: <cygwin.cygwin.com>

On Mon, Feb 28, 2011 at 2:21 PM, Gery Herbozo Jimenez  wrote:
>
> Dear Users,
>
> I can't run the following fortran script in my cygwin bash, I'm getting the following error message:

Gery,
it is not a cygwin problem. You must learn Fortran (at least a bit)

> $ g77 geometry.f -o geometry

geometry.f is not a script, it is a program source.
This program call functions zspl3 and spl3 that are missing in your source.

>
> /cygdrive/c/DOCUME~1/ADMINI~1/CONFIG~1/Temp/ccmHGeab.o:geometry.f:(.text+0x82d): undefined reference to `_zspl3_'
>

> I also copied in my current directory the file cygwin1.dll. I didn't
> write this program, I just found in internet and wanted to run it in
> cygwin. The script can be found here:
> http://www2.geo.uib.no/nav-processing/geometry/geometry.php
>
> Is it possible to run fortran programs in cygwin? I've searched for a
> simple answer in google but didn't find it. I'd be very grateful if
> someone could provide me some "simple" ideas to solve this issue.

As we have a compiler and several program built from fortran source,
the answer is of course yes.
Of course, knowing fortran helps a lot.

> Very grateful for you time and attention,
>
> Gery

Here there is an implementation of the required functions.
http://www.netlib.org/cheney-kincaid/spl3.f

remove the lines starting from
PARAMETER  (N = 10)
to the first END

and than compile with:

$ gfortran spl3.f geometry.f -o geometry

after that the programs is built and works
$ ./geometry
 Name of file with UTM coordinates of shot points:
....

Regards
Marco

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple