Microsoft KB Archive/104647

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

FIX: Two #ident or #pragma Comment Statements May Cause L5000

Q104647

1.00 WINDOWS kbtool kbfixlist kbbuglist ---------------------------------------------------------------------- The information in this article applies to: - The Microsoft C/C++ Compiler (CL.EXE), included with: - Microsoft Visual C++ for Windows, versions 1.0 ---------------------------------------------------------------------- SYMPTOMS ======== When using two #ident preprocessor directives or #pragma comments to insert two comments into an executable file, the linker generates an L5000 error when the second comment is longer than 20 characters. RESOLUTION ========== There are a three workarounds: - Make the second comment shorter than 20 characters. -or- - Compile with the optimizing compiler (/f-). -or- - Instead of using a #ident or #pragma comment, declare a literal character string in your application: char trademark[50]="Your trademarked name goes here" This will make the phrase "Your trademarked name goes here" appear in the executable file as well. STATUS ====== Microsoft has confirmed this to be a problem in the Microsoft products listed above. This is not a problem in Visual C++, 32-bit Edition. This problem was corrected in Visual C++ for Windows, version 1.0. MORE INFORMATION ================ The comments #ident "This is a comment" and #pragma comment(exestr,"This is a comment") both place the phrase "This is a comment" into the executable file. This comment can be seen when the .EXE file is viewed within an editor, and is often used for copyright protection. The first line can be longer than 20 characters and not generate the L5000 error. Sample Code ----------- /* Compile options needed: /f- to fix problem */ #ident "a" #ident "now is the time for a" void main(void) { } Additional reference words: 1.00 8.00 KBCategory: kbtool kbfixlist kbbuglist KBSubcategory: CLIss

Keywords : kb16bitonly kbCompiler
Issue type :
Technology : kbVCsearch kbAudDeveloper kbCVCComp


Last Reviewed: May 5, 2001
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.