It's perfectly possible, first thing you have to do is download MinGW (see (1) below for some suggestions). Then install it using the installer if you have one or just decompress the files in a directory (i.e.: D:\Tools\MinGW
).
Now, set the PATH
variable (Windows systems have it too) to point to the bin
directory. To do so, go to Control Panel\System and Security\System
and click in the Advanced system settings
options in the left panel. There select Environmental Variables...
and find it in the System variables
list.
Note that in Windows the separator among the directories placed in the PATH
variable is a ;
instead of a :
.
And you're all set, whatever is on a directory on the PATH
should be accessible from the command line. Instead of using the system-wide PATH
you may also create a PATH
user variable, it's up to you.
To access an environmental variable from the command line you use %
s (i.e.: echo %PATH%
). Using the command set
without parameters in a command line should display the current environment variables. You can use it to set the value of one too (i.e.: set LIBPATH=D:\Code\Libraries
).
(1). You may download it from several places: the original MinGW project (which has an installer too), TDM builds (also with an installer), MinGW-w64 (for 64-bit systems, but has toolchains targeting 32-bit too, also binaries for the 4.5 branch of GCC), ...