From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22275 invoked by alias); 4 May 2004 08:10:30 -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 22251 invoked from network); 4 May 2004 08:10:23 -0000 Received: from unknown (HELO main.gmane.org) (80.91.224.249) by sources.redhat.com with SMTP; 4 May 2004 08:10:23 -0000 Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1BKv0P-0002lm-00 for ; Tue, 04 May 2004 10:10:22 +0200 Received: from ts46-01-qds243.cbn.or.charter.com ([68.116.43.244]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 04 May 2004 10:10:21 +0200 Received: from dstrozzi by ts46-01-qds243.cbn.or.charter.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 04 May 2004 10:10:21 +0200 To: cygwin@cygwin.com From: David Strozzi Subject: fortran and C mixed-language program - cygwin the way to go? Date: Tue, 04 May 2004 08:10:00 -0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: main.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 68.116.42.244 (Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040421) X-SW-Source: 2004-05/txt/msg00090.txt.bz2 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. -- 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/