delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
To: | cygwin AT cygwin DOT com |
From: | Mark Hadfield <m DOT hadfield AT niwa DOT co DOT nz> |
Subject: | Re: Link error while compiling fortran |
Date: | Wed, 12 Jan 2005 11:43:17 +1300 |
Lines: | 66 |
Message-ID: | <41E45685.9030902@niwa.co.nz> |
References: | <200501112210 DOT j0BMAlEn022791 AT pilsener DOT srv DOT ualberta DOT ca> |
Mime-Version: | 1.0 |
X-Complaints-To: | usenet AT sea DOT gmane DOT org |
X-Gmane-NNTP-Posting-Host: | clam.niwa.cri.nz |
User-Agent: | Mozilla Thunderbird 1.0 (Windows/20041206) |
In-Reply-To: | <200501112210.j0BMAlEn022791@pilsener.srv.ualberta.ca> |
X-IsSubscribed: | yes |
Chad Neufeld wrote: > Hi, > > I have just updated my cygwin installation (January 11, 2005) and I can no > longer compile my fortran programs from the command line. > > [snip] > > This is what I type at the command line to compile a program: > > $ fl32 facqual.for > > This is the output from the fortran compiler. Please note the error message > on the last two lines: > > Compaq Visual Fortran Optimizing Compiler Version 6.6 (Update C) > Copyright 2003 Compaq Computer Corp. All rights reserved. > > facqual.for > /usr/bin/link: too many arguments > Try `/usr/bin/link --help' for more information. The CVF compiler is calling the wrong "link" command. It should be finding C:\Program Files\Microsoft Visual Studio\VC98\BIN\LINK.EXE (may be different on your system) and it's actually finding the link installed by Cygwin (part of Gnu coreutils). A similar issue will probably arise if you use the CVF command "df" to invoke the compiler. This will call Cygwin df (free disk space utility). You need to bring the appropriate directories to the front of your PATH before trying to compile or link with CVF. You will probably also need to set up other environment variables, like LIB and INCLUDE. I believe CVF offers to modify your master environment accordingly during installation, but this offer is best declined, as the CVF commands will then hide the Cygwin ones. CVF also installs a .BAT file somehwere to set up environment variables--you can use this from a Windows command prompt. Me, I normally invoke CVF (version 6.6.C, same as you) from the Cygwin bash shell and I have a bash function that sets everything up: dfvars () { echo Setting environment variables for Compaq Visual Fortran 6; msdev='C:\Program Files\Microsoft Visual Studio'; export MSDEVDIR=$msdev\\Common\\MSDEV98; export TOOLSDIR=$msdev\\Common\\TOOLS; export DFDIR=$msdev\\DF98; export VCDIR=$msdev\\VC98; export MSDEVDIR_POSIX=$(cygpath --unix "$MSDEVDIR"); export TOOLSDIR_POSIX=$(cygpath --unix "$TOOLSDIR"); export DFDIR_POSIX=$(cygpath --unix "$DFDIR"); export VCDIR_POSIX=$(cygpath --unix "$VCDIR"); export PATH=$MSDEVDIR_POSIX/Bin:$DFDIR_POSIX/Bin:$VCDIR_POSIX/Bin:$TOOLSDIR_POSIX:$PATH; export INCLUDE=$DFDIR\\Include';'$VCDIR\\Include; export LIB=$DFDIR\\Lib';'$VCDIR\\Lib; export DF="/nologo /traceback" } -- Mark Hadfield "Ka puwaha te tai nei, Hoea tatou" m DOT hadfield AT niwa DOT co DOT nz National Institute for Water and Atmospheric Research (NIWA) -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |