twibiral / obsidian-execute-code

Obsidian Plugin to execute code in a note.
MIT License
994 stars 61 forks source link

Does not work with WSL + Cling on Windows #333

Open daniel347x-cs opened 4 months ago

daniel347x-cs commented 4 months ago

I have WSL 2 installed; I built Cling from scratch in WSL on Windows and I can execute the cling binary in a WSL console without error; I have cling in the ~/.bashrc PATH so it can be executed in the WSL console via, simply, cling; it can also be executed via the absolute path.

However, it is not possible to get the C++ settings to work for the Execute Code plugin.

...and there is always an ENOENT error when attempting to run the code block.

Note: Python running in WSL (enabling the WSL setting and simply having 'python3' as the path to Python in the Execute Code settings for Python) succeeds, so WSL is being accessed.

It's just that C++ does not work, unfortunately. Alas! Took me two days to get Cling finally building in WSL hoping it would work with Execute Code - so just creating this issue so perhaps others will think twice before embarking on this route.

Thanks!

Yu2erer commented 3 weeks ago

I have the same problem.