$25
Good Old Hello World
Problem / Exercise
Set up your odin account properly and write a typical “Hello World” program in C++.
1 Setup Your Odin Account
Follow the instructions in this section to setup your .bash profile file.
1. SSH into odin.cs.uga.edu using your MyID and password. Be sure to turn on UGA VPN (remote.uga.edu) if you are off-campus.
2. Open up your ∼/.bash profile file (create it if it does not exist) in the plain text editor of your choice (e.g., emacs or vi). For example, if you are using vi, then this can be done with the following command:
$ vi ∼/.bash profile
3. Copy and paste the following lines into the bottom of the file:
################################################################################
# cs1730 paths export GCC_HOME=/usr/local/gcc/10.1.0 export GDB_HOME=/usr/local/gdb/9.2
# update link library path export LD_LIBRARY_PATH=$GCC_HOME/lib64:$LD_LIBRARY_PATH
# update exec paths export PATH=$GDB_HOME/bin:$PATH export PATH=$GCC_HOME/bin:$PATH
################################################################################
4. Logout of odin, then log back into odin. You can now verify if everything was setup correctly:
• If you type in:
$ gcc --version
Then it should say you’re using gcc (GCC) 10.1.0.
• If you type in:
$ g++ --version
1
Then it should say you’re using g++ (GCC) 10.1.0.
• If you type in:
$ gdb --version
Then it should say you’re using GNU gdb (GDB) 9.2.
Please copy the full output of the above 3 commands and paste them into your README file so that I know you have set up your odin account correctly.
2 “Hello World” C++ Program
2.1 Setup
Make sure that all of your files are in a directory called LastName-FirstName-lab01, where LastName and FirstName are replaced with your actual last and first names, respectively.
2.2 Code
For this lab, you should place your code into a file called lab01.cpp. Here is some more information about what is expected.
• Your program should output “Hello World” to the screen.
• The resulting executable must be called lab01. The expectation is that after your program is compiled and linked, the grader should be able to run your program by typing:
$ ./lab01
2.3 README File
Make sure to include a README file that includes the following information presented in a reasonably formatted way:
• Your Name and UGA ID (811#)
• Instructions on how to compile and run your program. Hint: If you setup your submission to include a Makefile, then these instructions are pretty simple.
• The full output of the 3 version checking commands noted in the previous section.
NOTE: Try to make sure that each line in your README file does not exceed 80 characters. Do not assume line-wrapping. Please manually insert a line break if a line exceeds 80 characters.