This is the mail archive of the cygwin 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: 32 and 64 bit cygwin on same machine?

I have run multiple versions of cygwin on the same machine. In my case,
both versions were 32-bit, but I don't see how that would make a
difference. You need to make sure that the environment variable for the
path to cygwin.dll is correct so the 64-bit dll gets loaded when you
open a 64-bit terminal.  I did that my using a windows .bat file that
starts the cygwin shell and creates a properly configured local environment.

This is the .bat file I use,

:: This bat removes the C:\cygwin\bin PATH environment variable for the
cygwin1 install that is
:: loaded into the cmd shell environment block from the registry. The
C:\cygwin2\bin PATH environment
:: variable for the cygwin2 install is then added to the PATH for the
environment block. A mintty
:: terminal is started from within the cygwin2 installation. The mintty
process inherits the
:: modified environment block. When the bat file closes, a mintty
terminal (running bash) is left
:: and has the proper PATH environment to run from the cygwin2 installation.

@echo off

:: remove "C:\cygwin\bin" from PATH
set "PATH=;%PATH%;"
set "PATH=%PATH:;;=;%"
set "PATH=;%PATH:;C:\cygwin\bin;=;%;"
set "PATH=%PATH:;;=%"

set "PATH=C:\cygwin2\bin;%PATH%"
start "" /b C:\cygwin2\bin\mintty.exe -i /Cygwin-Terminal.ico -

I think you could use something similar, just make sure to name your
cygwin installation and local package directories differently for the
two installs.

Of course, you could just move your 32-bit cygwin off the machine,
deleted the cygwin path variable, and install the 64-bit version. It's
not hard to move the original version back later.

Hope this helps,


Dominic Herity wrote:
> I'm using Python and Cygwin to test a 32 bit Windows dll.
> Now I need to test a 64 bit build of the same dll.
> Can I install 32 bit and 64 bit Cygwin on the same machine and choose
> to run either 32 bit or 64 bit python to test the corresponding dll?
> Or do I need to keep them on separate machines?
> Thanks
> Dominic
> --
> Problem reports:
> FAQ:         
> Documentation:
> Unsubscribe info:

Problem reports:
Unsubscribe info:

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