Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
293 views
in Technique[技术] by (71.8m points)

C++ Visual studio 2017 Intellisense marks error but build successfully

In C++ develop (mostly Cocos2d-x)

Visual studio 2017 marks red-line some namespace and class members. (like "..." is ambiguous, incomplete type not allowed)

also autocomplete is not working. build and run works fine. (weird)

sometimes Intellisense works fine. doesn't marks red-line and autocomplete also.

it makes me sick

I've tried uninstall and clean visual studio 2017 and re-install and updated most recent version

but still

any solutions?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

IntelliSense Limitations

IntelliSense does not work in C++ projects under the following circumstances:

  • The cursor is in a code comment.

  • You are writing a string literal.

  • A syntax error appears over the cursor.

  • The solution consists of either the syntax for managed C++, or the earlier Managed Extensions for C++ syntax.

  • IntelliSense is not fully supported when you reference a header file multiple times by using the #include directive, and the meaning of that header file changes because of various macro states that are defined through the #define directive. In other words, when you include a header file several times and the header usage changes under different macro states, IntelliSense does not always work.

Reference: https://msdn.microsoft.com/en-us/library/ms235519.aspx


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...