Unix and C Development Environments


MacOS

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


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

WSL Installation Guide - Ubuntu 20.04; update to WSL 2 is not necessary

Ubuntu WSL reference

For an older more detailed tutorial see the first 8.5 minutes of https://www.youtube.com/watch?v=Cvrqmq9A3tA (summary). If you have more than one version of Ubuntu installed see WSL commands and launch configurations and example.

Post-install:

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

  mkdir /mnt/c/osp
  cd; echo "cd /mnt/c/osp" >> .profile
The cd in .profile will go to /mnt/c/osp automatically on startup.
Files there are shared -- in MS/Win edit using WordPad, not NotePad; in WSL edit using nano.


Test Program

In a terminal window, in your osp subdirectory:
  $ wget http://fog.misty.com/perry/osp/examples/point/point.zip
  [or use curl -O if wget is not available]
  ...
  $ unzip point.zip
  ...
  $ rm point.zip
  $ cd point
  $ make
  gcc -std=c11 -pedantic -Wall -g -c main.c
  gcc -std=c11 -pedantic -Wall -g -c point.c
  gcc -std=c11 -pedantic -Wall -g main.o point.o -o main -lm
  $ ./main
  p: (1,2)
  q: (3,4)
  distance = 2.82843
  $ nano Point.h
  ...
  $ make clean
  $ cd ..
  $ zip -r point.zip point


Web-based Environments


Other Notes

From Sarvesh Kulkarni and Kyle Juretus for C++ and Networks courses:
  VirtualBox_Ubuntu_Installation.pdf & Issues and Solutions
  ubuntu20.04_post-installation_config_instructions.pdf


Old Notes

Ubuntu installation in VirtualBox; Disk defragment and partition and problems

Anjuta IDE for Linux - All or By Section