Setting up Dev-C++


This page shows you how to get Dev-C++ and how to install it. If you install Dev-C++ in its default directory (c:\dev-c++) then it will work, but ... some libraries (like Allegro) have difficulties with it. Therefore I advice to install Dev-C++ in the directory "c:\devcpp".

The following description has been copied mostly from Allegro.cc Forums.

These instructions will lead you through the steps for installing Dev-C++ 4.01. In addition, some updated files will be installed too, so you will have the latest version of the underlying Mingw32 compiler and file-utilities.

  1. Needed resources

    You will need the following resources. You may start downloading them while you read further.


  2. Preparations before installation

    If you happen to have Mingw, DJGPP or any other version of GCC installed, then uninstall them. Dev-C++ will replace them from now on. This step is required for getting Allegro to compile - we don't want your DJGPP installation to conflict with Dev-C++'s. Don't worry, you'll still have a fully functional gcc for Windows, and you can always reinstall the other compilers if you don't need to compile Allegro for Dev-C++.)

  3. Installing Dev-C++

    Unzip "devcpp4.zip" in a temporary directory (such as C:\temp), and run "setup.exe" from there. Select Typical install. Install it in a directory of your choice , but make sure do not use '+' in the name. For example, use "devcpp" instead of "Dev-C++" (I chose "c:\devcpp" as installation directory). This step is required for getting the command-line utilities to work properly.
    If you are running under Windows NT or 2000, you will need administritive priviliges to complete the installation.

  4. Update, upgrade, patch Dev-C++

    Unzip "devcpp401.zip" in the same directory where you installed Dev-C++ (In my case that is "c:\devcpp".)

    Unzip the Mingw32 updates (MinGW-1.1.tar.gz) in the directory where you installed Dev-C++.

    Using Power Archiver, unzip the Mingw32 file utilities (fileutils316-ming.tar.bz2) in the directory where you installed Dev-C++. Note: WinRAR or WinZip will not work properly!

  5. Finish Dev-C++ installation

    Now is the time to set up your path. If you're running Windows 95 or Windows 98, then open notepad, and edit your c:\autoexec.bat. Add those lines at the end of the file:

    SET PATH=C:\devcpp\bin;%path%
    SET MINGDIR=C:\devcpp

    Make sure you write the exact path of where you installed Dev-C++, and add \bin at the end of it. Reboot your computer for the change to take effect.

    If you're running Windows ME, you'll need to select "Run" off the start menu, then type in "msconfig". Select the environment tab, then make the changes as noted above. Reboot your computer for the changes to take effect.
    If you're running Windows 2000 (NT?), then open Control Pannel, then the "System" applet, then the "Advanced" tab, and finally the "Environment" button. Select the PATH= entry, and add "C:\devcp\bin" to it (without the quotes, and assuming you installed Dev-C++ in C:\devcpp). Create a new environment variable called MINGDIR and set it equal to "C:\devcpp" (again, without the quotes). You will need to log off and log back in for the changes to take effect.

    Note: If at any stage, you get an "Out of Environment space" message, please see the Allegro FAQ for how to fix this.

  6. Test the installation

    Open a DOS prompt. This is done by running the comamnd: C:\COMMAND.COM (or cmd.exe for Windows 2000 and Windows ME). You can create a shortcut to it on your desktop or start menu if you like. Go to the Dev-C++ directory (i.e. "CD c:\devcpp").

    Now's the time to test your installation. Type "gcc -v" (without the quotes) at the command prompt, followed by the key. You should see something like this:

    c:\devcpp>gcc -v
    Reading specs from c:/devcpp/bin/../lib/gcc-lib/mingw32/2.95.3-6/specs
    gcc version 2.95.3-6 (mingw special)

    If you get this or a similar text everything is ok!

The compiler environment is now installed...!