public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Toon Moene <toon@moene.indiv.nluug.nl>
To: stephen.buckley@excite.com
Cc: gcc-help@gcc.gnu.org
Subject: Re: g77 building own library of subroutines
Date: Thu, 04 Jul 2002 13:38:00 -0000	[thread overview]
Message-ID: <3D24A7D0.A8EDEA70@moene.indiv.nluug.nl> (raw)
In-Reply-To: <20020703195457.89335B6E5@xmxpita.excite.com>

stephen.buckley@excite.com wrote:

> this is my third attempt to get this to the help list. Message follows:
> 
> I have a couple of fortran subroutines that I would like to put together in my own library [and then call them with other programs] and would like to know how to do this using g77--the manuals don't seem to say much on this--on building your own library of subroutines and functions etc.

Not surprisingly as this is mostly OS dependent.

On Unix it goes like this:

1. Make object files from your Fortran source code:

	g77 [compiler flags] -o <source>.f

2. Make a library from all object files:

	ar r <lib>.a *.o

3. [ Depending on the exact Unix OS you either do or do not do this step
]
   Make an index for this library:

	ranlib <lib>.a

Hope this helps,

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)

  reply	other threads:[~2002-07-04 20:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-03 12:55 stephen.buckley
2002-07-04 13:38 ` Toon Moene [this message]
2002-07-04 21:06 stephen.buckley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D24A7D0.A8EDEA70@moene.indiv.nluug.nl \
    --to=toon@moene.indiv.nluug.nl \
    --cc=gcc-help@gcc.gnu.org \
    --cc=stephen.buckley@excite.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).