Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Thursday, July 25, 2019 9:34 AM
I'm working on a C++ project that's in the process of migrating from Visual Studio 2017 to 2019. In the project we're using third party libraries, some of which are deprecated (such as Qt4). In Visual Studio 2019 Intellisense is throwing up a lot of warnings about some of these third party libraries, flooding my Errors List. None of these warnings were present in Visual Studio 2017.
Is there a way of telling Intellisense to not look inside certain directories? Or some alternative solution?
I've tried adding the following to the additional compiler options (Property Pages -> C/C++ -> Command Line -> Additional Options):
/experimental:external /external:I ${ThirdPartyIncludesDirectory}
to mark the external libraries' directory as system (https://devblogs.microsoft.com/cppblog/broken-warnings-theory/) but that's made no difference. I'm guessing Intellisense doesn't look at this?
I'd rather not turn Intellisense warnings off entirely since it can give useful warnings in code I'm writing. And adding pragmas inside my own code to hide warnings from includes won't work because the warnings come from includes within the third party library.
Any suggestions would be great!
My Visual Studio info:
Microsoft Visual Studio Community 2019
Version 16.2.0
VisualStudio.16.Release/16.2.0+29123.88
Microsoft .NET Framework
Version 4.7.03056
Installed Version: Community
Visual C++ 2019 00435-60000-00000-AA788
Microsoft Visual C++ 2019
ASP.NET and Web Tools 2019 16.2.290.48383
ASP.NET and Web Tools 2019
C# Tools 3.2.0-beta4-19359-03+15b43b33901c88f68ef43f8314b5a2457716780d
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
ClangFormat 1.0
Formats code by calling the clang-format executable.
IntelliCode Extension 1.0
IntelliCode Visual Studio Extension Detailed Info
Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers
Microsoft Visual C++ Wizards 1.0
Microsoft Visual C++ Wizards
Microsoft Visual Studio VC Package 1.0
Microsoft Visual Studio VC Package
NuGet Package Manager 5.2.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/
ProjectServicesPackage Extension 1.0
ProjectServicesPackage Visual Studio Extension Detailed Info
Test Adapter for Boost.Test 1.0
Enables Visual Studio's testing tools with unit tests written for Boost.Test. The use terms and Third Party Notices are available in the extension installation directory.
Test Adapter for Google Test 1.0
Enables Visual Studio's testing tools with unit tests written for Google Test. The use terms and Third Party Notices are available in the extension installation directory.
Toggle Comment 1.8
This is a simple visual studio extension to comment/uncomment the selected lines.
Visual Basic Tools 3.2.0-beta4-19359-03+15b43b33901c88f68ef43f8314b5a2457716780d
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio
Visual Studio Tools for CMake 1.0
Visual Studio Tools for CMake
Visual Studio Tools for CMake 1.0
Visual Studio Tools for CMake
All replies (3)
Friday, July 26, 2019 8:35 AM
Hi Ha,
Welcome to the MSDN forum.
According to your requirements, for the intellisense warnings about the third party library, we can try to add the path to the third-party library in the Disable Specific Warnings box. You can refer to this link for more information:
l hope is could help you.
Best Regards,
Perry
MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected]
Monday, July 29, 2019 10:53 AM
Thanks Perry, that's seems to work great!
Is there a project wide setting for this, rather than setting it on each individual target? I have nearly 100 targets, some of which are "fake" targets that don't have "Property Pages" options. So I can't just select all targets and right-click to get to the "Property Pages" options.
Another issue is that I am working with CMake, so if I do disable the warnings for a target, the next time I run CMake that target is re-created and the "Disable Specific Warnings" setting is reset.
Can you think of any ways to get around this issue?
Thanks for your help.
Tuesday, July 30, 2019 10:24 AM
Hi Ha,
Thanks for your feedback.
At present, you can only follow this step of the Microsoft official document, only add a single warning and suppress it.
According to your description, it is actually not suitable for CMake project. Or if you still want your requirements, you can report a problem to VS product team.
**>>**Open VS ->Help->Send Feedback->Report a problem
Any feedback will be expected.
Best Regards,
Perry
MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected]