Difference between revisions of "CISC220 F2024 Setup"

From class_wiki
Jump to: navigation, search
(Created page with "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...")
(No difference)

Revision as of 07:39, 27 August 2024

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.

Key Unix commands

  • If you installed Ubuntu and you have a GUI-like desktop environment, to invoke the terminal (aka command line), click on the Ubuntu icon in the upper-left of the start bar to bring up the "dashboard". Type "terminal" in the search box and an icon for the terminal app will appear. Click this, or you can drag it to the start bar so it's always there. If you are SSH'ing to a Linux machine, you will be in the terminal by default.
  • 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.
    • 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