PRB: Visual Basic Read-only .exp/.lib Files Cause Compile Error (201565)
The information in this article applies to:
- Microsoft Visual SourceSafe for Windows 5.0
- Microsoft Visual SourceSafe for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q201565 SYMPTOMS
When compiling an ActiveX component, you might see the following error message:
Unexpected error occurred in code generator or linker. --View error messages?
If you click Yes, messages similar to the following might appear:
<project name>.OBJ : warning LNK4104: export of symbol"DllUnregisterServer" should be PRIVATE
<project name>.OBJ : warning LNK4104: export of symbol "DllGetClassObject" should be PRIVATE
<project name>.OBJ : warning LNK4104: export of symbol "DllRegisterServer" should be PRIVATE
<project name>.OBJ : warning LNK4104: export of symbol "DllCanUnloadNow" should be PRIVATE
Creating library <path to .lib file> and object <path to .exp file>
LINK : fatal error LNK1104: cannot open file "<path to .lib file>"
LINK : fatal error LNK1141: failure during build of exports file
NOTE: These warnings might vary or not appear at all.
CAUSE
The <project name>.exp and/or <project name>.lib files in the project directory are read-only.
RESOLUTION
Change the read-only attribute to read/write.
STATUS
This behavior is by design.
REFERENCES
For additional information, please see the following articles in the Microsoft Knowledge Base:
156513 INFO: Which Visual C++ Files to Add to Source-Code Control
132340 INFO: Common File Extensions Used by Visual C++
166470 PRB: LINK Fatal Error LNK1104 Cannot Open File
193089 PRB: Unexpected Error Occurs in Code Generator or Linker
166275 HOWTO: Debug a Native Code Visual Basic Component in VC++
For details about .exp files and import libraries, see "Working with Import Libraries and Export Files" in Visual C++ Help.
Modification Type: | Major | Last Reviewed: | 5/1/2001 |
---|
Keywords: | kbprb KB201565 |
---|
|