CISC220 F2024 Setup

From class_wiki
Revision as of 06:44, 27 August 2024 by Cer (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

All example code and template code for this course has been developed and tested on a Linux system. To do labs and programming projects, it MIGHT be helpful to have access to one as well for coding, compiling, and debugging.

Recommended

  • A very basic option for playing around, which is not enough for homeworks, is an online C++ shell.
  • Maybe the easiest option, which you should be familiar with from CISC210: SSH to an existing UD Linux machine such as go.cis.udel.edu. You should already have an account or it should be straightforward to request/renew one. nano is a simple text editor there, or you can edit locally and scp files to the remote machine for compilation.

Key Unix commands

  • Once you are in the terminal, here is a tutorial on commands, but the key ones are:
    • ls: List directory contents. This tells you what files and subdirectories are in the current directory.
    • cd: Change directory. This is how you move around between directories/folders. cd all by itself takes you back to your home directory, cd <name of subdirectory> takes you down to a subdirectory of the one you're in, and cd .. takes you up to the next higher-level directory.
  • tar/untar
    • General instructions here. You can do both operations from the file explorer: right-click on a tar file and choose "Extract Here", or right-click on a directory and choose "Compress".
    • To untar a file named foo.tar from the command line: tar -xvf foo.tar while you are in the same directory as foo.tar
    • To tar a directory named foo into a a tarfile named foo.tar: tar -cvf foo.tar foo while you are at the directory level ABOVE foo.

Alternatives (possible but not recommended)

  • Run Linux on your own Windows/MacOS laptop/desktop, such as Ubuntu desktop. This could be dual-boot or it could be in a virtual machine. I'm not going to put instructions for either here because it's probably best to only do this if you feel confident trying on your own.
    • After Ubuntu is installed, you would need to make sure there's a C++ compiler and a text editor or integrated development environment (IDE) as well
  • Code::Blocks: Make a new C++ project of type "Console Application" and follow the wizard instructions to name it, choose a directory, etc. Once it's created, put the CISC220-supplied main.cpp and any .txt files into the project directory, overwriting the Code::Blocks-created main.cpp. To compile, choose "Build and run" from the "Build" menu. If the program expects command-line input (like the name of a file to read), go to the Project / Set Programs' Arguments menu and type the filename or whatever into the Program Arguments text box.
  • Visual Studio instructions for building a C++ console app
  • Prof. Yarrington's instructions for C++ on Eclipse