TUTORIAL_NetBeans and MinGW Installation and Setup - CSCI150GTeam/GTeamProject GitHub Wiki

Install NetBeans

  • Go to the netbeans download page: https://netbeans.org/downloads/
  • Download either the 'C/C++' version or the 'all' bundle, version 7.4
  • Install the program once the download finishes

At this point, you've installed the NetBeans IDE, but you can't compile code with it until you install MinGW


Install MinGW

MinGW provides us with tools like a compiler, debug utility, and make utility, all essential and necessary to be able to compile code in NetBeans.

  • Go to http://sourceforge.net/projects/mingw/files/Installer/
  • Click on the link that says mingw-get-setup.exe to download the attached file
  • Run and install the program once the download finishes
  • You've just installed the "MinGW Installation Manager", which you will now use to download the actual tools
  • Open the MinGW Installation Manager once it is installed, and select 'Basic Setup' on the left side of the window
  • Click the checkboxes next to the following packages, and select 'mark for installation' for each of them:
    • mingw-developer-toolkit
    • mingw-base
    • mingw-gcc-g++
    • msys-base
  • Go to the Installation menu, and select 'Apply Selected'
  • The Installation Manager will download and install the packages, this may take a while
  • Once the download and install finishes, exit the Installation Manager

Configure MinGW and NetBeans

  • Configure Environment Variables
    • Go to Start Menu -> Control Panel -> System and Security -> System -> Advanced System Settings -> Advanced -> Environment Variables (Alternatively, in the start menu, type in 'environment' in the search field, and select 'Edit the system environment variables', then press 'Environment variables'
    • Scroll through the 'system variables' section and select the variable called 'path', then click the edit button
    • Without deleting the highlighted text, append the following string (without quotes) to what is already in the field: ";c:\MinGW\bin;c:\MinGW\msys\1.0\bin"
    • Click OK and exit out of the windows
  • Configure NetBeans to work with MinGW
    • Open NetBeans, go to the Tools -> Plugins -> Installed, and select the check box by 'C/C++'
    • If the only button available is the 'Deactivate' button, you're good to go; if the 'Activate' button is available, press it
  • Test NetBeans/MinGW
    • Create a new C/C++ Application, leave the info as default
    • Write a quick hello world program in the main file
    • If the program is successful, you set everything up right
    • Keep this project open, we're going to use it again