C++ Development Environments


  1. Windows Subsystem for Linux (WSL) - recommended for Windows systems

    Follow first 8.5 minutes of https://www.youtube.com/watch?v=Cvrqmq9A3tA

    Summary:

    1. Settings, Update & Security, For Developers, Developer Mode - On
    2. Control Panel, Programs, Turn Windows features on or off, Windows Subsystem for Linux - On
    3. Reboot
    4. Search bash, run, no installed distribution
    5. Microsoft Windows Store, search ubuntu, install; launch; create username, password
    6. sudo apt update; sudo apt upgrade

    Post-install:

      sudo apt install gcc g++ make gdb zip
      mkdir /mnt/c/cpp
      cd; echo "cd /mnt/c/cpp" >> .profile
    
    The cd in .profile will go to /mnt/c/cpp automatically on startup.
    Files there are shared -- in MS/Win edit using WordPad, not NotePad; in WSL edit using nano.


  2. Linux

    Easy: Ubuntu installation in VirtualBox

    Hard: Disk defragment and partition and problems

    Post-install:

      sudo apt update
      sudo apt upgrade
      sudo apt install gcc g++ make gdb zip
    


  3. MacOS

    Install Xcode? https://www.youtube.com/watch?v=1E_kBSka_ec

    ...


Test Program

In any of the above environments, in a terminal window, in your cpp subdirectory:

  $ wget http://fog.misty.com/perry/cpp/examples/Point/Point.zip
  ...
  $ unzip Point.zip
  ...
  $ rm Point.zip
  $ cd Point
  $ make
  g++ -std=c++17 -pedantic -Wall -g -c main.cc
  g++ -std=c++17 -pedantic -Wall -g main.o -o main
  $ ./main
  p: (1,2)
  q: (3,4)
  distance = 2.82843
  $ nano Point.h
  ...
  $ make clean
  $ cd ..
  $ zip -r Point.zip Point

Web-based Environments

  1. VECR

    - a1/p1.cc, etc. all in one file

  2. repl.it

    - your files are public in free account, e.g. https://repl.it/@fba524de41d/Point
    - to use make, in edit window: F1, type: shell
    - can use wget; then Run should find the files
    - to edit Makefile, settings: indent type tab, indent size 8

  3. onlinegdb.com

    - use C++17, set options: Extra Compiler Flags: -std=c++17 -pedantic -Wall -Werror

Other Environments

  1. Anjuta IDE for Linux

    Notes: All or By Section