CLion with 'Bash on Ubuntu on Windows'?

Newer Windows 10 preview build come with a new thing called `Bash on Ubuntu on Windows`. Would it be possible to support clang and g++ from here?

16 comments
Official comment

Hi, Andrew!

 

The only option I see now is to use cross-compiling toolchain configuring it with CMake toolchain file. If it's not an option for you then I can tell that we just started working on remote projects support https://youtrack.jetbrains.com/issue/CPP-744 where you'll be able to choose CMake and other parts of toolchain on remote machine having only sources locally. Currently we don't have any exact time estimations on that but hopefully we'll be able to support some cases in 2017.3

 

Thanks!

Hi Aidan!

If your goal is to develop for Windows platform (building Windows binaries) then it won't work for you since currently everything launched from bash work in native Linux environment and in this case will produce Linux binaries.

0

My goal is to have ease of access to apt packages without the hassle of Linux graphics drivers, I can compile binaries for Windows later, I just want the ease of development Linux brings with it, without the hassle.

0

Could you please describe which packages are you interested in?  Have you tried cygwin toolchain for gcc compiler?

BTW we recently added tutorial about how to setup toolchains on Windows https://www.jetbrains.com/help/clion/2016.1/quick-tutorial-on-configuring-clion-on-windows.html.

0

It's missing libraries that are central to the things I'm making, like CurlPP and Websockets++

0

I unpacked clion for linux on "ubuntu on windows". When I tried running it, it hangs. I have an xserver running on my Win10 machine, so I expected it to at least display the splash screen, but it didn't. Any ideas?

0

I'd be really nice to have this ability, this would enable the use of features like the gold linker for gcc.

0

Have you run clion with `DISPLAY=:0 ./clion.sh` ?

Also, if your Windows swap size is smaller than your RAM, you're the victim of https://github.com/Microsoft/BashOnWindows/issues/1403 .

0

 

Our environment runs on cmake / visual studio on windows and cmake / makefiles on Linux. Because the former configuration is not supported by CLion, the only way for me to use CLion is to run it in linux. Here is my basic setup:

1. Install bash for windows, install required compilers etc
2. Install x window server in Windows 
3. Install Linux CLion in bash for windows
4. Start x window server in windows
5. In bash: set display, start clion

The only problem is the UI is slow. It would be great if CLion supported Visual Studio as a CMake generator in which case I would not have to do this. I would not want to attempt to mirror a linux environment using cygwin. There are just too many moving parts and getting specific versions of tools in cygwin is not straight forward. 

0

Running Clion inside the subsystem is definitely too slow, it would be much easier and faster if we were not bound to Cygwin or MinGW when running Clion on Windows and could just use the gcc, g++, cmake etc. from the linux subsystem ..

 

Please guys, make it possible!

8

I'm trying to do this also. I am doing cross platform embedded development, and for other reasons (that don't bear going into here) my primary work machine has to be a windows box. It would be great if I could mount my cross compiler tool chain into Bash on Ubuntu on Windows (I currently use sshfs with FUSE to do this on the Linux laptop I'm currently restricted to) then being able to build into that subsystem would be fantastic. 

Even the ability to actually use the native GCC from the Bash on Windows subsystem would be great instead of having to use Cygwin or Mingw... It exists now, and seemingly is native. May as well support it and start using it!

2

That would be ideal to use WSL for CLion. We can always cross compile for Windows/Mingw from Linux subsystem. Cygwin is horrendously slow and Mingw64 is horrendously weird (not including /usr/local/include by default, wtf?). Hey, even Microsoft does that in Visual Studio.

0

I've been using CLion with the cygwin toolchain as a proxy for developing Linux applications while on Windows (as opposed to some sort of remote toolchain).  I've never been trying to actually build applications to run under cygwin.  Maybe some people do, but not me.

Bash on Ubuntu on Windows is a nice alternative to cygwin for having a unix-like experience on Windows.  Only time will tell, but it could end up making cygwin totally obsolete.

It would be great if this toolchain was supported by CLion.

0

Developing on Windows but want to compile for Unix. Considering how highly configurable CLion is in all other aspects, I'm disappointed how tightly coupled the build environment is.

0

So... 

"Running Clion inside the subsystem is definitely too slow, it would be much easier and faster if we were not bound to Cygwin or MinGW when running Clion on Windows and could just use the gcc, g++, cmake etc. from the linux subsystem .."

 

Is this possible yet?

2

Yes - I am using Clion on WSL.

But I met many difficulties - all of them WSL issues.  Here is a summary of what I had to do:

.. I (again) edited: /etc/ssh/sshd_config and uncommented: ListenAddress: 0.0.0.0
 
Now it works very, very well.  Compile / run is slower than my 48 core server .. but it is so much better than running over VNC.

 

0

Please sign in to leave a comment.