Книга: Embedded Linux development using Eclipse

Installing MinGW

Installing MinGW

The MinGW download page is http://www.sourceforge.net/project/showfiles.php?group_id=2435. The first item in the list is MinGW-5.1.3. Clicking the Download button brings up another page with the actual file, MinGW-5.1.3.exe. Much like Cygwin, this is an installer that guides you through the installation. Start the program, select Download, and install. After agreeing to the license you can choose which package to install: Previous, Current, or Candidate. I recommend Current.

Select the MinGW base tools and the g++ compiler components (Figure 2.6). Select other compilers if you wish. Don’t select MinGW Make. There’s a more complete implementation of make called MSYS that you’ll install in a subsequent step. Select an install location and a Start Menu folder, and click Install. There’s about 60 MB to download, so it takes a while.


Figure 2.6: MinGW component selection.

Oddly, the MinGW installer doesn’t install gdb. It can be downloaded at http://www.downloads.sourceforge.net/mingw/gdb-6.6.tar.bz2. Extract the contents of this file to the same location as MinGW.

If you want to create your own makefiles for use with CDT, you should install MSYS, also part of the MinGW project. MSYS, which stands for Minimal SYStem, is a POSIX-like command line interpreter (CLI) that serves as an alternative to theWindows command prompt, cmd.exe. As such, it facilitates the execution of POSIX-style build scripts and makefiles that are normally part of Open Source projects. The CLI is essentially a Bourne shell.

The MSYS installer is available from the same SourceForge page as MinGW. Click on MSYS Base System to get a list of the available releases. Select the Current Release and click on MSYS-1.0.10.exe to download the installer. After agreeing to the license terms and reviewing a release notes page, you get a dialog to select the installation folder. I chose to install MSYS in the MinGW folder just to keep everything in one place. This is followed by a Select Components dialog, but in fact there is only one component.

Following installation, a command prompt window pops up to ask if you would like to execute the post-install process (Figure 2.7). Upon replying yes, “y”, you’re asked if you have MinGW installed and where it’s located. Post-install then builds some script files.


Figure 2.7: MSYS post install script.

The installation process puts an MSYS shortcut on your desktop. Double-click it to bring up the window in Figure 2.8. Try some POSIX shell commands to prove it works. For all practical purposes, MSYS provides the same functionality as Cygwin, so you really only need one or the other. In fact, its author describes MSYS as a fork of Cygwin that is “more friendly to the Win32 user.”


Figure 2.8: MSYS command shell.

Оглавление книги

Оглавление статьи/книги

Генерация: 1.070. Запросов К БД/Cache: 3 / 1
поделиться
Вверх Вниз