twibiral / obsidian-execute-code

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

Added support for other C compiler: gcc #305

Closed melo-afk closed 4 months ago

melo-afk commented 10 months ago

I mainly changed the CExecutor.ts and NonInteractiveCodeExecutor.ts files so that a temporary .c file is made, compiled and the output executed (both files get deleted after compiling/execution)

tested on win 10/11

In the C Settings of the plugin, the compiler is set by providing the path. Arguments like -Wextra -Werror -Wall should work as well. The main function is always needed for gcc. If gcc throws an error while compiling, it is displayed below the codeblock.

Inputting things via scanf() does not work.

twibiral commented 8 months ago

Hey, that's great! Thank you for contributing!

Do you mind updating your branch based on main?

melo-afk commented 8 months ago

no problem. The branch should be updated now

twibiral commented 4 months ago

Thanks for the contribution! It will be released soon