Cygwin: Difference between revisions

From OSDev.wiki
Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content added Content deleted
No edit summary
 
No edit summary
Line 1: Line 1:
=== What is Cygwin? ===
"Cygwin" is two things. For one, it is a DLL implementing most of the POSIX API on top of Windows, so to ease porting GNU/Linux tools to Windows.
"Cygwin" is two things. For one, it is a DLL implementing most of the POSIX API on top of Windows, so to ease porting GNU/Linux tools to Windows.


But in a wider sense it is also a setup.exe for downloading and installing a wide collection of such ported tools on your Windows machine, including a bash shell, GCC toolchain, Apache, PostgreSQL, and many other valuables. As such, it enables OS developers working with Windows to use the same toolset as OS developers under Linux.
But in a wider sense it is also a setup.exe for downloading and installing a wide collection of such ported tools on your Windows machine, including a bash shell, GCC toolchain, Apache, PostgreSQL, and many other valuables. As such, it enables OS developers working with Windows to use the same toolset as OS developers under Linux.


=== How do I use it? ===
== Using Cygwin ==
The Cygwin installer offers to add an icon to your start menu and / or desktop. By clicking on that, you get a console which actually is a bash shell. /cygdrive/<letter>/ under Cygwin is equivalent to <letter>:\ under Windows.
The Cygwin installer offers to add an icon to your start menu and / or desktop. By clicking on that, you get a console which actually is a bash shell. /cygdrive/<letter>/ under Cygwin is equivalent to <letter>:\ under Windows.


Line 11: Line 10:
After the installer finished, you just pick up the GCC manual from gcc.gnu.org (or do 'info gcc' in the Cygwin shell) and be a happy camper.
After the installer finished, you just pick up the GCC manual from gcc.gnu.org (or do 'info gcc' in the Cygwin shell) and be a happy camper.


=== Cygwin, beyond OSDev... ===
== Cygwin beyond OSDev ==
If you go beyond OS development, there are several caveats regarding Cygwin that make its approach of "POSIX on Windows" less than perfect. Some of these caveats are collected in the [Cygwin Issues] document. Two more refer to [Licensing Issues] when linking Windows applications using Cygwin:
If you go beyond OS development, there are several caveats regarding Cygwin that make its approach of "POSIX on Windows" less than perfect. Some of these caveats are collected in the [Cygwin Issues] document. Two more refer to [Licensing Issues] when linking Windows applications using Cygwin:


Line 19: Line 18:
If you intend to use the Cygwin gcc for building software, you should check out the permutations of the "win32" and "no-cygwin" options.
If you intend to use the Cygwin gcc for building software, you should check out the permutations of the "win32" and "no-cygwin" options.


=== External Links ===
== External Links ==
http://www.cygwin.com/ - Cygwin Environment Official Site
http://www.cygwin.com/ - Cygwin Environment Official Site

Revision as of 04:29, 1 December 2006

"Cygwin" is two things. For one, it is a DLL implementing most of the POSIX API on top of Windows, so to ease porting GNU/Linux tools to Windows.

But in a wider sense it is also a setup.exe for downloading and installing a wide collection of such ported tools on your Windows machine, including a bash shell, GCC toolchain, Apache, PostgreSQL, and many other valuables. As such, it enables OS developers working with Windows to use the same toolset as OS developers under Linux.

Using Cygwin

The Cygwin installer offers to add an icon to your start menu and / or desktop. By clicking on that, you get a console which actually is a bash shell. /cygdrive/<letter>/ under Cygwin is equivalent to <letter>:\ under Windows.

By default the Cygwin installer does not install GCC. Just restart the installer and select GCC (and, if you want to do C++, G++) from the "devel" group. (And whatever other tools you want; recommended minimum is make, rcs, cvs, and openssh.)

After the installer finished, you just pick up the GCC manual from gcc.gnu.org (or do 'info gcc' in the Cygwin shell) and be a happy camper.

Cygwin beyond OSDev

If you go beyond OS development, there are several caveats regarding Cygwin that make its approach of "POSIX on Windows" less than perfect. Some of these caveats are collected in the [Cygwin Issues] document. Two more refer to [Licensing Issues] when linking Windows applications using Cygwin:

  • linking to the Cygwin DLL (POSIX API) makes your code fall under the GPL if distributed, and being dependent on the Cygwin DLL being present in a system;
  • linking to the standard msvcrt.dll (Win32 API) leaves the licensing decision in your hands and makes your code independent of the Cygwin DLL. Alas, no POSIX here.

If you intend to use the Cygwin gcc for building software, you should check out the permutations of the "win32" and "no-cygwin" options.

External Links

http://www.cygwin.com/ - Cygwin Environment Official Site