From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14240 invoked by alias); 4 May 2004 12:59:15 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 14230 invoked from network); 4 May 2004 12:59:12 -0000 Received: from unknown (HELO koeln.convey.de) (62.138.63.18) by sources.redhat.com with SMTP; 4 May 2004 12:59:12 -0000 Received: from ismene.koeln.convey.de (192.168.5.3:1311) by koeln.convey.de with [XMail 1.17 (Win32/Ix86) ESMTP Server] id for from ; Tue, 4 May 2004 14:59:11 +0200 Date: Tue, 04 May 2004 12:59:00 -0000 From: "Gerrit P. Haase" Reply-To: "Gerrit P. Haase" Organization: Esse keine toten Tiere Message-ID: <1442007126.20040504145805@familiehaase.de> To: David Strozzi CC: cygwin@cygwin.com Subject: Re: fortran and C mixed-language program - cygwin the way to go? In-Reply-To: References: MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-SW-Source: 2004-05/txt/msg00097.txt.bz2 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/