- Install a text editor, preferably Visual Studio Code.
- Open extensions tab in VSC in the left-side panel by pressing the following icon:
- Find and install
C/C++
extension.
Once you have WSL2 or a virtual machine set up, you might connect to it using Visual Studio Code. In the left-down corner you might click on that icon then connect to your machine:
Recommended way
- Check that you have virtualization enabled:
- open Task Manager
- click on the Performance tab, and then click on CPU
- look for the Virtualization section and check if it says "Enabled" or "Disabled"
- Open PowerShell with Administrator priviledges (right click -> Run as Admin)
- Run the following commands:
wsl install
wsl install ubuntu
- Open the WSL instance:
ubuntu
- Install
WSL
extension in VSC.
NOTE: If you have problems installing WSL2, you might try to install a virtual machine instead.
- Install a hypervisor. You might choose between VMWare and VirtualBox.
- Download whatever Linux image (.iso) you want then install it on the
hypervisor.
PS: For improved performance I suggest you to install Ubuntu Server, then connect to the VM using SSH via VSC. Be aware that you won't have a GUI installed.
PPS: If you don't feel comfortable using only the terminal and you need visual feedback, DO NOT install a server image.
This approach is not recommended
If you cannot install WSL2, nor a virtual machine, you can use Windows instead,
but only for lab purposes.
For homeworks you might have problems because they are meant to run in Linux
environments.
For example, one problem is that your executable file won't be .out
, but .exe
and you might have problems testing it on the automatic flow from Moodle / VMChecker.
- Install MinGW. Follow all instructions, including adding the app to PATH.
- Open
C:\MinGW:\bin
folder and locate themingw32-make.exe
file and rename it tomake
. - Restart your PowerShell and make sure that environment variables are set properly. If they are, the following commands might succeed:
gcc --version
make --version
- Install GIT.
sudo apt update
sudo apt install build-essentials
sudo apt install git-all
Open a terminal and check if you have brew installed:
brew --version
If it is not installed, follow these instructions.
Install GIT:
sudo brew update
sudo brew upgrade
sudo brew install git
Check if you have GCC installed:
gcc --version
If it is not installed, run the following commands:
sudo brew update
sudo brew upgrade
sudo brew install gcc
Install C dev dependencies:
xcode-select --install
Congrats! 🎉 🙌🏻 Now you are all set to begin your PCLP1 journey 🚀