[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: wrong link command called

From: Jonathan Baccash
Subject: RE: wrong link command called
Date: Tue, 29 Mar 2005 11:08:20 -0800

No, my PATH is set properly.  As I stated in my first email, the link
command calls the correct link command if you force make to spawn a
shell to do it, i.e. when I try something like "which link && link
/DEBUG $^ /OUT:$@".  The problem is that GNU make uses OpenFile(), which
first looks in the directory where make was begun, BEFORE the path.
This is apparently not how the Cygwin shell lookup works.


-----Original Message-----
From: Earnie Boyd [mailto:address@hidden 
Sent: Tuesday, March 29, 2005 3:48 AM
To: Jonathan Baccash
Cc: address@hidden
Subject: Re: wrong link command called

<quote who="Jonathan Baccash">
> Try `link --help' for more information.
> C:\cygwin\bin\make.exe: *** [my.exe] Error 256
> From my command shell, I try "which link" and I get
> /cygdrive/c/PF/MSVS2003/VC7/BIN/link, which is correct.  But there is
> another link program in C:/cygwin/bin, which is also where I have put
> make.exe, and this other link does something completely different.
> problem occurs in sub_proc.c line 330 the call to OpenFile().
> to MSDN library
> base/openfile.asp, the call looks in the directory where the
> was loaded even before looking in PATH.  This is extremely weird,
> because if I change the command to require invocation of the shell,
> "which link && link /DEBUG $^ /OUT:$@", makefile works as intended.

If you set and export PATH from within the Makefile does it help/

> Is this a known issue?  Is this a bug, or is this the intended
> I'm wondering why make doesn't just always execute the shell?
> Performance?  This might be difficult to fix otherwise - is the order
> lookup for cmd.exe the same as for OpenFile?

It is dependent upon the environment in which you operate.  Your issue
not make specific it is environment specific.  You may need to change
Windows value of PATH in order to have the fact that you have
/cygwin/bin/link and /cygdrive/c/PF/MSVS2003/VC7/BIN/link in PATH.  You
could try renaming /cygwin/bin/link I'm not sure what package that comes
from but some invocation of setup update may cause it to be reinstated.


      MinGW -
       Wiki -
 SF Project -
Job Listing -


If you have received this e-mail in error, please delete it and notify the 
sender as soon as possible. The contents of this e-mail may be confidential and 
the unauthorized use, copying, or dissemination of it and any attachments to 
it, is prohibited. 

Internet communications are not secure and Hyperion does not, therefore, accept 
legal responsibility for the contents of this message nor for any damage caused 
by viruses.  The views expressed here do not necessarily represent those of 

For more information about Hyperion, please visit our Web site at

reply via email to

[Prev in Thread] Current Thread [Next in Thread]