What does the / DISALLOWLIB message mean in VC ++ linker output?

I track the linker error with the VC ++ 2005 application. When I turn on the verbose output from the linker, I notice a ton of these messages:

Processed / DISALLOWLIB: nafxcwd.lib

What does the / DISALLOWLIB switch mean?

+3
source share
1 answer

It stops using some libraries in combination with other libraries. For example, a library msvcrtd.libhas a record prohibiting msvcrt.lib(since placing versions of debugging and release of this library in the same executable file will cause all kinds of problems).

, , ( Visual Studio). :

#pragma comment(linker, "/disallowlib:somelib.lib")

, , . . :

dumpbin.exe /rawdata msvcrtd.lib

- :

/disallowlib:libcmt.lib
/disallowlib:libcmtd.lib
/disallowlib:msvcrt.lib

, , "" .

+6

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


All Articles