Disabling Intellisense warnings for third party libraries

  • Thread starter Thread starter Ha Jun
  • Start date Start date
H

Ha Jun

Guest
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 (Broken Warnings Theory | C++ Team Blog) 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 NuGet Documentation

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

Continue reading...
 
Back
Top