Zeioth/compiler.nvim

Windows support requires WLS at the moment (Windows Linux Subsystem)

TimeCubed opened this issue · 3 comments

Although the title might look like a joke, it's really not doing anything.
I tried to run :CompilerOpen on a hello world app in C++ but it just wouldn't compile anything. Here's an
image that shows this.
I waited for a while and nothing ended up happening. There's also a couple issues with your README.MD file. The plugin requires telescope.nvim as well as plenary.nvim installed and loaded, both of which you failed to mention. Other than that, this is the one issue I'm having a ton of problems with, and I have no idea what to do about it. Please help me.

Just for clarification: the directory in the image is correct. I was editing my neovim config. It's also important to mention that I'm using Windows 11 64 bit.

Zeioth commented

Issue identified

For what I can see in your image, the error seems to be that to properly support Windows, we need to take care of using \ instead of / on directory paths.

Solution

For now, the Windows Linux Subsystem is required to run the compiler on WIndows. See how to enable it here.

More info

I can confirm the bug only affects windows. The screenshot shows linux.
screenshot_2023-07-02_15-49-59_758405971

We are using the next GNU utilities that are present in all operative systems except windows:

  • mkdir
  • rm
  • time

If we want to support windows without the Linux subsystem, we will have to use multi system lua utilities like plenary. Also we will have to totally eliminate time (utility to show time that took to run the program) for windows users. This might increase the complexity of the project, so let's think about it for now.

Zeioth commented

Native Windows support added in commit 56d0c77 but bear in mind WSL is still recommended, as manually installing the compilers required by compiler.nvim without using apt can be VERY tricky. Please check the FAQ and dependencies sections of the README for more info.