- Open Powershell as Administrator and run:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
- Open the Microsoft Store, search for Ubuntu, and install
- Launch Ubuntu and create your Linux user
- Open a shell into WSL (I like cmder so far: http://cmder.net/)
- In Windows, download and install MobaXterm (free version): https://mobaxterm.mobatek.net/download.html
- Make sure X server is running
- You’ll always need to run MobaXterm, and in the top right corner of the app there’s an "X server" button. Make sure it’s running.
- In mobaxterm settings -> x11 -> set OpenGL Acceleration to: Hardware
- WSL won't have a display environment variable set by default, so tell it manually to connect to the first display:
export DISPLAY=:0.0
- Test an x11 app:
sudo apt-get install x11-apps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Put app.ico in directory. | |
2. Create app.rc in same directory with one line: | |
IDI_ICON1 ICON DISCARDABLE "app.ico" | |
3. Run command (Warning: it's app.o, not app.res, how it is mentioned in other manuals!) | |
windres app.rc -o app.o | |
4. add_executable(app | |
... |