News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Silly question regarding Windows Subsystem for Linux.

Started by Goofus Maximus, June 04, 2017, 06:04:35 AM

Previous topic - Next topic

Goofus Maximus

With the Windows Subsystem for Linux, one can run linux commands from a windows command prompt, using the "bash -c" command.  So I was wondering if it would be possible to set up WSL compilers as a valid target compilers for Code Blocks in Windows 10 (creator's update), and if so, just how much work would that entail?

stahta01

You would need to edit the CB source code to allow the shell to be changed.
And, then you would need to build Code::Blocks from the edited source code.

Edit: I would guess you would find more things that need to be done.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Goofus Maximus

#2
Well that's just it. You don't need to change the shell, since one of the features of this is that you can run bash commands from the dos command prompt, using the "bash -c yourlinuxcommandhere", and have the output in the command prompt.  Example attached below:

The way Windows is mixing and matching Windows and Linux together here is kind of exciting.  I haven't gone off the deep end, and tried the whole xming x-server for windows, to try and run the graphical linux apps, which some folks have done, with limited success, so I don't know of code blocks for linux is one of those apps that don't run afoul of linux subsystem restrictions or not.

Meh.  never mind.  Tried using different commands like sudo apt-get update, and it just lists help text instead of running.  It would've been nice, but no dice.