Skip to content

dadevel/xwin-starterpack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xwin-starterpack

Develop and debug Windows software on Linux with the power of Clang and Xwin.

Install LLVM and OpenSSH in a Windows VM.

winget install --source=winget --id=LLVM.LLVM

Add-WindowsCapability -Online -Name OpenSSH.Server
[System.IO.File]::WriteAllLines('C:\ProgramData\ssh\administrators_authroized_keys', 'YOUR SSH PUBLIC KEY HERE', (New-Object System.Text.UTF8Encoding $false))
icacls.exe C:\ProgramData\ssh\administrators_authorized_keys /inheritance:r /grant Administrators:F /grant SYSTEM:F
New-ItemProperty -Path 'HKLM:\SOFTWARE\OpenSSH' -Name DefaultShell -Value 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' -PropertyType String -Force
Set-Service -Name sshd -StartupType 'Automatic'
Restart-Service sshd

Forward the ports used by LLDB from your Linux machine over SSH to the Windows VM.

ssh -L 127.0.0.1:1234:127.0.0.1:1234 -L 127.0.0.1:2345:127.0.0.1:2345 administrator@windev

Start the LLDB server on Windows.

mkdir C:\Build
cd C:\Build
& "C:\Program Files\LLVM\bin\lldb-server.exe" platform --server --listen 1234 --gdbserver-port 2345

Back on Linux open this project in Visual Studio Code and confirm the Reopen in Container recommendation.

code .

When you are using Podman instead of Docker you need an additional environment variable.

DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock code .

That's it. Now you are ready to go.

References:

About

Windows C/C++ development environment on Linux

Topics

Resources

License

Stars

18 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors