X-Spam-Check-By: sourceware.org Date: Tue, 27 Jun 2006 18:55:18 -0400 (EDT) From: Igor Peshansky Reply-To: cygwin AT cygwin DOT com To: "Williams, Gerald S (Jerry)" cc: cygwin AT cygwin DOT com Subject: RE: Fortran Compiler Error CMBFAST In-Reply-To: <4C89134832705D4D85A6CD2EBF38AE0F549824@PAUMAILU03.ags.agere.com> Message-ID: References: <4C89134832705D4D85A6CD2EBF38AE0F549824 AT PAUMAILU03 DOT ags DOT agere DOT com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Tue, 27 Jun 2006, Williams, Gerald S (Jerry) wrote: > I just recreated the problem with some minimal code, > and got some more information in the process: > > Create a file "foo.for" that contains one line: > include 'foo.inc' > > Create an empty file named foo.inc in the same > directory. > > Copy "foo.for" to "foo.f", "foo.FOR", and "foo.F" and > try to compile all four of them from that directory: > > $ f77 -c foo.for # runs OK > $ f77 -c foo.f # runs OK > $ f77 -c foo.FOR # runs OK > $ f77 -c foo.F > foo.F:1: > include 'foo.inc' > ^ > Unable to open INCLUDE file `foo.inc' at (^) > $ _ Doesn't foo.F represent a FORTRAN file that needs to be preprocessed by the C preprocessor? Changing foo.F to contain #include "foo.inc" makes it work for me. > So it seems that the rules by which the preprocessor > looks in the current directory and/or the directory > containing the source file does not apply to files > named *.F for some reason. It's possible that this > was intentional, although I don't get this behavior > on my Linux box (which granted is using GCC version > 3.2.3, so it could have changed since then...). Does running f77 with '-v' help? Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com ZZZzz /,`.-'`' -. ;-;;,_ Igor Peshansky, Ph.D. (name changed!) |,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte." "But no -- you are no fool; you call yourself a fool, there's proof enough in that!" -- Rostand, "Cyrano de Bergerac" -- 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/