This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Crash when compiling Sitecopy


On Thu, 8 Jan 2004, Frantisek Fuka wrote:

> Igor Pechtchanski wrote:
> > On Thu, 8 Jan 2004, Frantisek Fuka wrote:
> >
> >>[snip]
> >>Thank you all for the help. The problem was that I kept the old
> >>cygwin1.dll because I needed it to run the old sitecopy version.
> >
> >
> > FWIW, there should be no need to do this.  Newer versions of cygwin1.dll
> > should let older applications run just fine.  If this is not the case,
> > it's a bug and should be reported.
>
> I investigated it further and found out the following:
>
> I had OLD cygwin1.dll in c:\windows\system\ directory. This is probably
> something I did a long time ago so that I could run the old sitecopy.exe
> form the standard Windows .BAT script (without using bash or any other
> cygwin component).
>
> If I understand it correctly, the actual cygwin1.dll should always be in
> c:\cygwin\bin, where it is. Strange thing is, when I tried do compile
> the new sitecopy, the compiler crashed (see previous messages) beacuse
> of the old DLL in the \SYSTEM directory. When I deleted this DLL
> (without doing anything else), the compilation finished without
> problems. I have no idea why was cygwin looking into \SYSTEM dir, if the
> needed DLL should be (and was present) in \bin.

Windows uses the PATH variable to find DLLs.  If c:\windows\system was in
the path before c:\cygwin\bin, the DLL in \system will be found instead.
There's no special Cygwin magic here.

> So, now I have the latest cygwin but I can no longer run it from a
> standard Windows BAT file because it doesn't "see" cygwin1.dll file (and
> other DLL files it needs). How to solve this cleanly? Copy the DLLs to
> \SYSTEM directory? Or is it enough to change the current directory to
> "c:\cygwin\bin" before running sitecopy.exe?

Only if you have "." in your PATH.

Generally, Windows apps look in their directory (the one that contains the
executable), and then search the PATH.  The best solution to be able to
run Cygwin applications from anywhere is to add "c:\cygwin\bin" to your
global Windows PATH (you can add it at the end).
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]