DOCUMENT:Q193089 24-SEP-1998 [vbwin] TITLE :PRB: Unexpected Error Occurs in Code Generator or Linker PRODUCT :Microsoft Visual Basic for Windows PROD/VER:WINDOWS:6.0 OPER/SYS:WINDOWS KEYWORDS: ====================================================================== --------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual Basic Learning, Professional, and Enterprise Editions for Windows, version 6.0 --------------------------------------------------------------------- SYMPTOMS ======== When compiling an upgraded Visual Basic 5.0 project in Visual Basic 6.0, you may received the following error message: "Unexpected Error Occurred in Code Generator or Linker." CAUSE ===== This is caused by the existence of a project.pdb (symbol) file in the directory into which you are compiling the project. RESOLUTION ========== There are two possible resolutions to this issue: - Delete the existing .pdb file. -or- - Compile the project (exe or dll) into a different directory. MORE INFORMATION ================ Steps to Reproduce Behavior --------------------------- Create and compile a Visual Basic 5.0 project: 1. Create a Standard EXE project in Visual Basic 5.0. Form1 is created by default. 2. Select Project Properties from the Project menu. 3. Select the Compile tab. 4. Select Compile to Native Code and check Create Symbolic Debug Info. 5. Save and compile the project. Upgrade and compile in Visual Basic 6.0: 1. Open the Visual Basic 5.0 project with Visual Basic 6.0. 2. Compile the project and note that you receive the following error message: Unexpected Error Occurred in Code Generator or Linker. Additional query words: kbdss kbDSupport kbVBp kbVBp600 kbCompiler kbVBp500 ====================================================================== Version : WINDOWS:6.0 Platform : WINDOWS Issue type : kbprb ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 1998.