开发者

How to suppress all warnings from non-solution files in VisualStudio

开发者 https://www.devze.com 2023-03-12 18:50 出处:网络
I wonder, whether it is possible to suppress warnings coming from included library files, while showing all solution-file warnings in Visual Studio?

I wonder, whether it is possible to suppress warnings coming from included library files, while showing all solution-file warnings in Visual Studio? I have a solution that uses stingray library. When I build the solution I keep getting numerous warnings from stingray files, so I am loosi开发者_运维知识库ng warnings from my files (that are actually in solution and that I own and edit). For me there is no value in included warnings, since I cannot edit those files, but I do need to see all my warnings.

Is there any way I could do it?

Added after first answer: Sorry for being not clear - I am not building third party library - I am linking the libraries they provided, but I am including their headers in my own - as a results I have numerous warnings in "file included from..." - is there any way to sort that out?

-- Thanks in advance


#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)


Open your third party library's project properties, you can minimize your warning level in build tab.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号