Microsoft KB Archive/100540

From BetaArchive Wiki

BUG: L2025 Error Because Member Function Not Decorated


7.00 | 1.00 1.50 MS-DOS | WINDOWS kbtool kbbuglist ---------------------------------------------------------------------- The information in this article applies to: - The Microsoft C/C++ Compiler (CL.EXE), included with: - Microsoft C/C++ for MS-DOS, version 7.0 - Microsoft Visual C++ for Windows, versions 1.0 and 1.5 ---------------------------------------------------------------------- SYMPTOMS ======== An attempt to link an application compiled with Microsoft C/C++ fails and Microsoft LINK generates the following message: L2025: _main : symbol defined more than once CAUSE ===== A class in the application contains a member function named "main()". RESOLUTION ========== At present, the only method to work around this error involves changing the name of the function to something other than "main()". STATUS ====== Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. MORE INFORMATION ================ The following code example demonstrates this problem. Sample Code ----------- /* * Compile options needed: None */ class test { public: static void main() { }; }; void main (void) { test t; t.main(); } Additional reference words: 1.00 1.50 7.00 8.00 8.00c KBCategory: kbtool kbbuglist KBSubcategory: CPPIss

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

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