Windows 10 recently added an option to run Bash on Windows using a Ubuntu based Linux subsystem.
Details on how to install that subsystem can be found here: https://msdn.microsoft.com/en-us/comman ... tall_guide
And more details can be found here: https://blogs.msdn.microsoft.com/wsl/20 ... -overview/
Also make sure you read this important information: https://blogs.msdn.microsoft.com/comman ... and-tools/
Zeus Enhancements for Bash
Once you have that subsystem up an running you can access it via Zeus just like any other compiler, shell or tool.
As an example consider the configuration shown below which lets you run the GNU C compiler and have it capture the error output, just as you would do if you were configuring a Windows compiler:
More Ways to Configure Zeus for Bash
The latest release of Zeus adds features that let you work with this subsystem and they are described below.
1. Bash Tool Menu Options
The Tools menu adds two new menu options as shown below:
The Bash Command Line menu allows you to bring up a dialog to run a bash command and have the output captured inside Zeus:
The Bash Shell menu allows you to open up the Bash shell which is identical to the shell shown earlier.
2. Tools Options
The configuration of Tools now has an option to define a Bash commands as tools:
3. Compilers Options
To run the GNU C or C++ compilers you need to test to see if the compilers are installed.
For example to test if the C compiler is installed try running this command using the Zeus Bash command line optioned mentioned earlier:
If this result in the following output message it means the compiler is not installed:
Code: Select all
Code: Select all
The program 'gcc' is currently not installed.
To install the the C and C++ compilers open the bash shell and run these commands respectively:
With the compilers installed the new Compiler configuration options found in the document type can now be used to run these compilers as shown below:
Code: Select all
sudo apt-get install gcc sudo apt-get install g++
Using these options the Bash compiler command will be run from inside Zeus and the output captured.
4. Workspace Options
The workspace configuration now has an option to define Bash commands for the Project building options:
Using this option the Bash make commands will be run from inside Zeus and the output captured.
5. File Editing Options
The Ubuntu subsystem automatically creates mount points in /mnt for each of the corresponding Windows drives.
For example, that means you can access the files on your C: drive from inside the Bash shell using the /mnt/c/ mount and vice versa.
This means you could edit the code on the Windows side and compile the code on the Bash side and the two sides will always be in sync via the mount point.
But one cause of trouble would be the different line encodings used by Windows and Linux.
Another source of problems would be the fact that Windows uses a BOM for UTF8 files where as Linux does not.
Both of these issues are easily resolved by configuring the Zeus document type to be Linux friendly as shown below:
With these settings in place Zeus will make sure the files are always Linux friendly.
This means you can do all the coding on the Windows side using Zeus, yet have that code compiled on the Linux side and this can all be do without leaving Zeus