Skip to content
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

namespace "std" has no member "thread" #952

Closed
PikaMeow opened this issue Aug 7, 2017 · 8 comments
Closed

namespace "std" has no member "thread" #952

PikaMeow opened this issue Aug 7, 2017 · 8 comments
Labels
Feature: Configuration An issue related to configuring the extension or IntelliSense Language Service question

Comments

@PikaMeow
Copy link

PikaMeow commented Aug 7, 2017

When I use the std::thread in my code, there will be an error like this:
_0 un xqx 2 qx22cruy442

But I can click "go to the declaration" on it, and jump to file "thread" and see the class definiton of thread:
_2 1o 8d xkl3 ajco pbd4

I use cygwin environment on Windows, here is my include_path in c_cpp_properties.json:

"includePath": [
        "C:\\cygwin64\\usr\\include",
        "C:\\cygwin64\\lib\\gcc\\x86_64-pc-cygwin\\5.4.0\\include",
        "C:\\cygwin64\\lib\\gcc\\x86_64-pc-cygwin\\5.4.0\\include\\c++",
        "C:\\cygwin64\\lib\\gcc\\x86_64-pc-cygwin\\5.4.0\\include\\c++\\x86_64-pc-cygwin",
        "${workspaceRoot}"
    ]

When I build with -std=c++11, I can run the program normally, I just can't eliminate the warning.
Did I miss some path? Or should I add some macro definition in the .json file?

@bobbrow
Copy link
Member

bobbrow commented Aug 7, 2017

what does gcc report as the default include path when you run gcc -v -E -x c++ -? You should copy whatever gcc tells you into your includePath for best results.

@bobbrow
Copy link
Member

bobbrow commented Aug 7, 2017

Also, please make sure you set the "intelliSenseMode" to "clang-x64" in the c_cpp_properties.json file if you haven't already.

@bobbrow
Copy link
Member

bobbrow commented Sep 26, 2017

Let us know if the suggestions above were unable to help you resolve your issue.

@bobbrow bobbrow closed this as completed Sep 26, 2017
@alitoufighi
Copy link

mutex

properties

I think this is a relevant issue. Above are my error with using mutex and my c_cpp_properties.json file. I added everything I saw on the Internet in it but still not working.

@sean-mcmanus
Copy link
Collaborator

@alitoufighi The "no type named" message doesn't come from our extension. Do you have another one installed?

@wrgallo
Copy link

wrgallo commented Sep 30, 2020

VSCode Extensions > C/C++ > Extension Settings > C_CPP: Intelli Sense Engine > Set to "Tag Parser"

This solved the problem for me.

@bobbrow
Copy link
Member

bobbrow commented Sep 30, 2020

Using the "Tag Parser" engine will disable IntelliSense squiggles and remove semantic matches in the autocomplete list. It's not recommended unless you are using a specialized compiler that is incompatible with MSVC or GCC/Clang.

As this issue is quite dated, the information is old. You should use compilerPath in your configuration in c_cpp_properties.json to tell the extension where the system headers are. It is not recommended to add the system include paths directly to includePath anymore.

@microsoft microsoft locked as resolved and limited conversation to collaborators Sep 30, 2020
@bobbrow
Copy link
Member

bobbrow commented Sep 30, 2020

If you are having issues with red squiggles or getting the extension configured at all, please open a new issue and we'd be happy to help you troubleshoot it.

@bobbrow bobbrow added the Feature: Configuration An issue related to configuring the extension or IntelliSense label Sep 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature: Configuration An issue related to configuring the extension or IntelliSense Language Service question
Projects
None yet
Development

No branches or pull requests

5 participants