This lab is due by Wednesday, August 21, 2024, Before Class.
As with all labs you may, and are encouraged, to pair program a solution to this lab. If you choose to pair program a solution, be sure that you individually understand how to generate the correct solution.
VS Code Setup
First, why is this lab zero instead of lab one? Because computer scientists always start with zero! (This will become more evident later in the semester ... there's a reason why we do it!)
Before you begin working on any programming project, you must set up some kind of "workspace" on your computer. Software engineers call this "setting up your development environment". For this class, you will need only two things: a compiler and a text editor or IDE. Our compiler will be g++ and our editor will be VS Code.
You may use any of the campus lab machines or you may setup your personal machine. If you plan to primarily use the campus lab machines, then skip to Part II. Otherwise, to continue with your personal machine go to Part I.
Part I - Setup your Personal Computer (Recommended)
If you want to set up your own computer, then you will need to make sure you have a compiler installed. The compiler will depend on your operating system:
-
Windows: Download and install this version of MinGW (this package
is setup with additional dependencies for use within the course). Unzip the file and place the contents at C:\mingw64.
Additionally, we
will want to have the MinGW folder on your path to be able to execute programs from later. In the Windows start menu, search for
Edit system environment variables
and in the resultant window pressEnvironment variables
. SelectPath
from the bottom system box and hitEdit
. HitNew
and enterC:\mingw64\mingw64\bin
(or potentiallyC:\mingw64\bin
- verify wheremingw64/bin
was unzipped to). HitOK
thenOK
.-
Note: If you install MinGW from a different source that is not the above link, you will also want to install
sed
in order for all the course tools to work as desired. On the sed for Windows webpage, download theBinaries Zip
and theDependencies zip
. Extract both. From theBinaries
package, copy thebin/sed.exe
file into yourmingw64/bin
folder. From theDependencies
package, copy thebin/*.dll
files into yourmingw64/bin
folder as well.
-
Note: If you install MinGW from a different source that is not the above link, you will also want to install
- Mac: Install the XCode Command Line Tools. This is a
decent tutorial a to walk you through the steps.
Be sure to follow the instructions for the "How to Install Xcode Command Line Tools from a Command Prompt" option, not the full XCode or Homebrew setups.
- Linux: I trust you know what you're doing with your OS, but you should be good to go.
Then, regardless of OS, install VS Code. Be sure to choose the version that matches your system.
- Windows: Select the System Installer.
- Mac: If you have a newer M1/M2 Mac, then select the Apple Silicon zip.
- Linux: Select the appropriate format.
Regardless of OS, once VS Code is installed and opened you will want to install the C/C++ Extension Pack from the Extension Marketplace (see the left hand menu). This extension will install Intellisense and other helpful tools. This will help with syntax coloring, code completion, and other realtime editing tools.
Part II - Test Your Setup
We will fully test your setup soon, with Lab1A. To verify everything is
setup at this point, open VS Code. From the top menu, select Terminal > New Terminal. In the bottom window that opens, type g++ --version
and hit enter.
You should see a copyright notice and version information printed to the terminal. If there is a message saying g++ does not exist
, then there
was an error with setup. Verify the steps above were completed. If additional help is needed, then please post online.
To complete this lab, go to Canvas > Assignments and complete the Lab0 Survey. Even if you have had trouble getting VS Code fully set up, report your progress to Canvas.
This lab is due by Wednesday, August 21, 2024, Before Class.
As with all labs you may, and are encouraged, to pair program a solution to this lab. If you choose to pair program a solution, be sure that you individually understand how to generate the correct solution.