-
Notifications
You must be signed in to change notification settings - Fork 858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cl.exe can't find main.cpp when running from wsl location #3118
Comments
I believe this is what you're looking for: https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/Building%20the%20Extension.md Might also be relevant: https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/Debugger/gdb/Windows%20Subsystem%20for%20Linux.md File path has changed on FCU from If there's still an issue with your testcase file it at over in https://github.com/Microsoft/vscode-cpptools |
Thanks for your answer DarthSpock. (EDIT: I believe you wanted to answer to this post: #3112 :P) I'm not quite how this solution addresses the issue though. I'm not using Visual Studio Code, I'm using Visual Studio 2017 Community Edition. The issue is that the compiler is unable to see the cpp file it's trying to compile because it expects it to be in the CWD which it isn't. This is what happens when I try to compile the file without cmake:
|
You can file Community Edition over there as well as it uses the same cpp tools. You'll find there's very little difference between the 2 but seeing as I've used VS Code vice Community Edition, I'm not savvy with the specific differences from a technical perspective. As I've said, I recommend filing with the CPP folks. They have plenty of exposure to us WSL folks bugging them for things. |
Aight, I filed the issue there too. Thanks DarthSpock! |
My mistake was to also use wsl's cmake. When using cmake for windows, the project is compiling. I'm closing this issue. |
Apparently Windows 10 version 19H1 will have an upgrade on WSL to expose the Linux-only files in Windows, using something similar to a network share thingy? That will be a general solution and, once that is fixed, Windows tools will finally be able to work with files within your home directory. [Sorry for the necro] |
I just discovered that windows/wsl interoperability is now possible. That's awesome and I tought, maybe I could use wsl instead of cygwin!
So what I'm trying to achieve is to build a windows app using the MSVC toolchain with cmake. I don't actually want to do crosscompiling - i.e. I don't want to use mingw. I want to use wsl as an alternative to cygwin to compile a windows application.
(I read a little on the matter and I found out that there is currently a limitation that might partly explain the issue described below - https://blogs.msdn.microsoft.com/commandline/2016/11/17/do-not-change-linux-files-using-windows-apps-and-tools/)
wsl.exe
.When I run cmake I get the following error:
main.cpp
without cmake:Windows Build Number: Microsoft Windows [Version 10.0.16299.371]
test.tar.gz
The text was updated successfully, but these errors were encountered: