The information in this article applies to:
SYMPTOMSThe comment pragma allows the user to insert comments into an object file or executable file. The lib specifier allows the user to pass this comment to the linker to specify additional libraries to link when using the object module. Some users utilize the lib comment pragma to add linker options as well as library names, such as:
This line, under Visual C++ 2.x, would pass the string to the linker
as is, resulting in the addition of the /VERBOSE linker option as well
as the MSVCRT.LIB library. This behavior was not specified to work in
this manner. The compiler wouldn't put quotes around comment string,
so spaces would delimit the text.
In Visual C++ 4.0, 4.1, and 4.2, the compiler correctly puts quotes around the comment string thereby causing the above code to generate the following error:
RESOLUTIONUse the following new pragma to specify linker options:
STATUSThis behavior is by design. MORE INFORMATIONSample Code
REFERENCESFor more information on /VERBOSE), please see the product documentation. Additional query words: 10.00 10.10 10.20
Keywords : kbusage kbCompiler kbVC400 kbVC410 kbVC420 kbVC500 kbVC600 |
Last Reviewed: September 16, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |