Difference between revisions of "CISC220 F2024 Setup"
From class_wiki
(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...") |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
<!--* Access UD compute machines remotely. [https://www.eecis.udel.edu/wiki/ececis-docs/index.php/FAQ/RemoteAccess hoek.eecis.udel.edu] runs Linux and [http://www.udel.edu/it/help/unix/using.html strauss.udel.edu] runs SunOS. The latter typically requires some Makefile path changes. --> | <!--* Access UD compute machines remotely. [https://www.eecis.udel.edu/wiki/ececis-docs/index.php/FAQ/RemoteAccess hoek.eecis.udel.edu] runs Linux and [http://www.udel.edu/it/help/unix/using.html strauss.udel.edu] runs SunOS. The latter typically requires some Makefile path changes. --> | ||
* A very basic option for playing around, which is not enough for homeworks, is an [http://cpp.sh/ online C++ shell]. | * A very basic option for playing around, which is not enough for homeworks, is an [http://cpp.sh/ online C++ shell]. | ||
− | * Maybe the easiest option, which you should be familiar with from CISC210: SSH to an existing UD Linux machine such as <tt>go.cis.udel.edu</tt>. You should already have an account or it should be straightforward to request/renew one. | + | * '''Maybe the easiest option''', which you should be familiar with from CISC210: SSH to an existing UD Linux machine such as <tt>go.cis.udel.edu</tt>. You should already have an account or it should be straightforward to request/renew one. <tt>[https://www.nano-editor.org/ nano]</tt> is a simple text editor there, or you can edit locally and <tt>[https://www.geeksforgeeks.org/scp-command-in-linux-with-examples/ scp]</tt> files to the remote machine for compilation. |
==Key Unix commands== | ==Key Unix commands== | ||
− | |||
− | |||
* Once you are in the terminal, here is a [https://help.ubuntu.com/community/UsingTheTerminal tutorial on commands], but the key ones are: | * Once you are in the terminal, here is a [https://help.ubuntu.com/community/UsingTheTerminal tutorial on commands], but the key ones are: | ||
Line 19: | Line 17: | ||
==Alternatives (possible but not recommended)== | ==Alternatives (possible but not recommended)== | ||
− | * Run Linux on your own Windows/MacOS laptop/desktop, such as [http://www.ubuntu.com/desktop Ubuntu desktop]. This could be dual-boot or it could be in a virtual machine. | + | * Run Linux on your own Windows/MacOS laptop/desktop, such as [http://www.ubuntu.com/desktop 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 | ** 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 [https://learn.microsoft.com/en-us/cpp/build/vscpp-step-1-create?view=msvc-170 instructions for building a C++ console app] | |
− | + | * [https://www.eecis.udel.edu/~yarringt/CISC220/InstallingEclipseInstructions.pdf Prof. Yarrington's instructions for C++ on Eclipse] |
Latest revision as of 06:44, 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. 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