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
Can not find conversion from std::filesystem::path to std::string in WSL #2424
Comments
This is a duplicate of #2422 . We'll double-check that this scenario is also fixed as well. You could revert to 0.17.6 to fix this, but 0.18.0 should be higher quality over all (i.e. a bunch of other bogus errors were fixed). |
@huww98 How do you get filesystem to compile with gcc-8? I get an error about std::filesystem has not been declared. |
Actually, this is a regression from 0.18.0 -- it appears to be caused by --ms-extensions being added when it shouldn't be. Reverting back to 0.17.7 should fix it: https://github.com/Microsoft/vscode-cpptools/releases/tag/v0.17.7 . |
Should be fixed now with 0.18.1. |
This keeps haunting my colleague @mheden. Same setup as me (VSCode-Insiders 1.27.0 with C++ ext 0.18.1) and _WIN32 is always enabled on his end, but not on mine. Same SW project. Any way of confirming which options are being sent to the compiler? |
@csholmq Yeah, the _WIN32 defined is probably the cause -- why is that defined in his case? What OS/compiler is being used? On Windows, -fms-extensions or -fno-ms-extensions can be added to the compilerPath to modify the behavior (MinGW has -fms-extensions set by default). You can see (some of the) flags we pass to our compiler by setting the C_Cpp.loggingLevel to Debug and then opening a new .cpp file, e.g.
|
He's on Win10. We haven't configured anything but set IntelliSenseMode to gcc-x64 (ARM code project). So no external compiler used. Would prefer to have it that way since each project comes with the compiler bundled and has a unique path. Will try to compare output when he's back in the office. |
It seems like the problem is caused by having With |
@mheden are you setting If you are working on an ARM code project as @csholmq mentions, then I would recommend you set |
@bobbrow Right. Since the compiler is embedded with each project I don't have a system default one. So I would prefer to keep it blank at this time. Is this all working for me because I have WSL installed and it succeeds to detect GCC there? And subsequently because @mheden had Clang installed it detected that first. |
In the search for compilers on Windows, we will pick GCC on WSL before we will pick Clang. If you are doing mostly ARM development, I don't think it will hurt to set The only thing we use the compiler for is to query the system includes and defines and then send those over to the IntelliSense server process. |
Type: LanguageService
I disabled all other extensions and issue persists.
Can not find conversion from std::filesystem::path to std::string.
I encounter this problem after upgraded to 1.18.0.
I use g++-8 from Ubuntu 18.04 in WSL.
To Reproduce
main.cpp
c_cpp_properties.json
Intellisense shows error: no suitable user-defined conversion from "std::filesystem::__cxx11::path" to "std::__cxx11::string" exists
Expected behavior
no error reported.
Screenshots
Additional context
log from output window
The text was updated successfully, but these errors were encountered: