Windows subsystem for Linux and mixed (Windows + Linux) development


  1. Posts : 4
    Windows 10
       #1

    Windows subsystem for Linux and mixed (Windows + Linux) development


    I am developing some C++ based code using Visual Studio 2019 VC++. The code builds using Makefiles and VC++ in a devenv command shell. But the testing code was written a long time ago and is based on Unix shell scripts and binaries so I need the unix/linux shell to run the tests. Now in the past I used Cygwin to do this by starting the Cygwin shell after setting up the VS20XX development env using vcvars bat file and any other env settings needed for VS20XX. I could then run unix stuff and access the dirs needed for the VStudio build binaries, etc.

    I assumed I could do the same with Windows Subsystem for Linux but based on my experience so far it appears like it is a more isolated environment and basically appropriate for doing Linux stuff in almost a separate world from the Windows command environment. I know how to acess the filesystem, etc. from WSL but it doesn't seem like there is any east way to do the same thing I do with Cygwin where I get everything "setup" in Windows cmd prompt and then just turn that environment into a Linux/Bash capable environment for the testing scripts.

    If anybody knows if this is possible and I am just missing something I would appreciate it, since it seems silly to keep using Cygwin with WSL already available, but so far I can't figure out how to "mix" the two environments.

    TIA,
    -Scott
      My Computer


  2. Posts : 11,247
    Windows / Linux : Arch Linux
       #2

    Hi there
    it's a bit messy but you can run some Linux GUI programs in the WSL -- I think the WSL was originally intended to be able to run bash shell scripting and native Linux command line functions rather than attempt to have a fully working WINE type of thing --after all if you are already running Windows why would you want to run a Windows application within the WSL !!!!

    If you need complex Linux functionality --IMO it's better to create a full blown VM --Linux is FREE so no problems obtaining any number of distros to try out as VM's.

    there are a few instances where running a Linux GUI on Windows is worth while == I like the GRSYNC program for backing up data etc --it's a GUI front end to the rsync program and it can recurse / travel througk directories / sub directories / whole HDD's etc etc -- beats ROBOCOPY by a zillion miles / Km or whatever.

    As far as Cygwin is concerned -- you'd be better off switching to use gtk -- also on Linux newer versions of python are very useable --this runs easily enough on the WSL.

    Cheers
    jimbo
      My Computer


  3. Posts : 4
    Windows 10
    Thread Starter
       #3

    Thanks for the response Jimbo. I have WSL setup and already have Linux VM's but I was more interested in understanding if WSL running Ubuntu/CentOS/etc. could replace Msys2 or Cygwin64. In those environments I can have gcc, clang, other linux dev tools and still access Visual C++ and Visual Studio tools. This is the part that kind of confuses me. I am just getting started with WSL but it appears like it is very isolated from Windows development tools and SDK's so not really good for say building source code intended for windows dev tools with "nmake" and then testing with Linux tools like runtest.sh scripts written for bash/sh.

    Not sure if you or anyone else has experience using WSL like this, essentially a mixed or hybrid development environment where you use tools from both operating systems.

    Cheers,
    -Scott
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 22:39.
Find Us




Windows 10 Forums