How to deal with warning BK4504

With warning level 4 set in my C ++ project, I see the following:

Warning 1 warning BK4504: file contains too many links; ignoring further links from this source c: \ program files (x86) \ windows kits \ 8.1 \ include \ um \ mshtml.h 37492

mshtml.h is listed in the External Dependencies folder of my project and, as far as I can tell, it appears as a header provided by Microsoft as part of the Windows 8.1 SDK.

I am a beginner programmer, and my research shows that this is a problem with mshtml.h exceeding the limit of 64 000 character references, after which BCSMAKE throws up its hands and generates this message.

Can I just ignore this warning? I know that you can disable certain warnings using the #pragma , but where can I place this directive? I tried #pragma warning(disable: 4504) in several places in the source files, but the warning persists.

The only way to reliably disable this message is to disable the Enable information overview in the project settings, but I feel that I do not need to do this.

+5
source share
1 answer

My "solution" was to disable BSC generation for afxhtml.h (including mshtml.h) as follows:

 #pragma component(browser, off, references) #include <afxhtml.h> #pragma component(browser, on, references) 

You can read more about this #pragma here: MSDN: component

+8
source

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


All Articles