How to suppress all warnings from files without a solution in VisualStudio

I wonder if it is possible to suppress warnings coming from the included library files by showing all warnings of the solution file in Visual Studio? I have a solution using the stingray library. When I create a solution, I constantly get numerous warnings from stingray files, so I lose warnings from my files (which are really in the solution and that I own and edit). For me there is no value in the included warnings, since I cannot edit these files, but I need to see all my warnings.

Is there any way to do this?

Added after the first answer: Sorry for the ambiguity - I am not creating a third-party library - I am linking the libraries they provided, but I am including their headers in my own. As a result, I have numerous warnings in the "file included from ..." - is there any way to deal with this?

- Thanks in advance

+6
source share
2 answers
  #pragma warning (push, 3)

 # include third-party h-files

 #pragma warning (pop)

Another way:

  #pragma warning (disable: 4507 4510)

 # include third-party h-files

 #pragma warning (default: 4507 4510)
+7
source

Open the project properties of a third-party library, you can minimize the warning level on the assembly tab.

0
source

Source: https://habr.com/ru/post/890545/


All Articles