X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.1 required=5.0	tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <COL119-W5155DA74F8057398F7D3E0B0DE0@phx.gbl>
References: <COL119-W5155DA74F8057398F7D3E0B0DE0@phx.gbl>
Date: Mon, 28 Feb 2011 15:51:36 +0100
Message-ID: <AANLkTimFcKjgNLiibefWdAyMd2z84TJYXE7PHhjJ=uJF@mail.gmail.com>
Subject: Re: Fortran program error message
From: marco atzeri <marco.atzeri@gmail.com>
To: cygwin@cygwin.com
Cc: Gery Herbozo Jimenez <gamejihou@hotmail.com>
Content-Type: text/plain; charset=ISO-8859-1
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list 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

