public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Gerrit P. Haase" <freeweb@nyckelpiga.de>
To: David Strozzi <dstrozzi@mit.edu>
Cc: cygwin@cygwin.com
Subject: Re: fortran and C mixed-language program - cygwin the way to go?
Date: Tue, 04 May 2004 12:59:00 -0000	[thread overview]
Message-ID: <1442007126.20040504145805@familiehaase.de> (raw)
In-Reply-To: <loom.20040504T095207-205@post.gmane.org>

Hi David,

you can try to build FFTW with the MinGW GCC compiler, though I'm not
sure that it is possible at all ( http://www.mingw.org/ ).
The MinGW compiler doesn't use Cygwin but MSVCRT as C library.


Gerrit


David wrote:

> Hi,

> I don't know if this is the right list to post this question to, but please bear
> with me.

> I'm using cygwin on windows XP.  I have a large fortran 95 program that I
> compile with Compaq Visual Fortran 6.6.  There is no way g77 will handle the
> fortran 9x features I'm using, and g95 is still larval.  So let's take the
> fortran compiler as fixed.

> I want to use FFTW, the open-source fft library from mit (www.fftw.org), in the
> code.  FFTW is written in C.  Its make process can setup wrapper functions for
> calling FFTW routines from fortran.  I think I figured out the right way to
> configure the wrappers for my fortran compiler.

> The problem is linking it all togheter.  I'm using DF (the compaq visual fortran
> command-line compiler) to control the compilation of the fortran, and the
> linking of the final exe.  I setup a small test suite of a fortran caller and C
> function, and DF compiles them correctly.  Not quite there with fftw.

> I can compile the fortran with DF, and the C with gcc under cygwin. I then try
> linking them together.  If I don't include libfftw.a in the linking, DF can't
> find the fftw routines.  If I include libfftw.a, then it can.

> BUT, df can then not find what look like low-level C routines, like ___getreent
> and ___gettimeofday.  From poking around on the web I found out that ___getreent
> is in libpthread.a on cygwin.  I can't get the others to work.


> I have no idea if my approach (compile fortran and link w/ df, compile the fftw
> C library w/ gcc for cygwin) is a good idea, or possible at all.  Any advice on
> a good approach would be very greatly appreciated.  I'm not an expert on
> compilers, all I want is something that'll let me use a C library in fortran.
> And hopefully not make me buy a C compiler!

> Thanks very much.



-- 
=^..^=                                     http://nyckelpiga.de/donate.html


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

  reply	other threads:[~2004-05-04 12:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-04  8:10 David Strozzi
2004-05-04 12:59 ` Gerrit P. Haase [this message]
2004-05-04 13:52 ` Larry Hall

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=1442007126.20040504145805@familiehaase.de \
    --to=freeweb@nyckelpiga.de \
    --cc=cygwin@cygwin.com \
    --cc=dstrozzi@mit.edu \
    /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).