Build Magnum in a Linux Subsystem on Windows

~ 1 minute read.

I re­cent­ly had the plea­sure to fi­nal­ly in­stall an ubun­tu sub­sys­tem on my Win­dows 10 PC to com­pile test some C++ code on GCC.

For you to need to search less, here’s how I pro­ceed­ed:

Install Linux Subsystem

To en­able the sub­sys­tem fea­ture, run the fol­low­ing in Pow­er­Shell with ad­min­is­tra­tive priv­iledges:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

You will need to restart your sys­tem af­ter­wards. Then search e.g. “Ubun­tu” on the Win­dows Store and in­stall. (Oth­er dis­tros are avail­able!)

Source

Build Magnum

You will need to in­stall OpenGL on the sub­sys­tem. You can do this ei­ther by fol­low­ing the in­struc­tions here, or build the mag­num de­bian pack­ages, which should have the re­quired li­braries as de­pe­den­den­cies.

Writ­ten in 10 min­utes