twibiral / obsidian-execute-code

Obsidian Plugin to execute code in a note.
MIT License
1.09k stars 66 forks source link

Trouble running C code on Windows in WSL mode #329

Open DrNightingales opened 8 months ago

DrNightingales commented 8 months ago

I use Windows 11 and have WSL2 Ubuntu 22.04.3 Lts installed. I've downloaded binaries of cling from their webpage and placed them in my home directory (the path is /home/drn/cling/bin/cling). But when I try to run C code, it spits out some gibberish and an error: Screenshot 2024-02-04 192501

I also attach the screenshot of my settings: Screenshot 2024-02-04 192734

Running wsl -e /home/drn/cling/bin/cling -x c < code_file.c in terminal produces correct output and runs the code.