Article ID: 201565
Article Last Modified on 5/1/2001
APPLIES TO
- Microsoft Visual SourceSafe 5.0 Standard Edition
- Microsoft Visual SourceSafe 6.0 Standard Edition
- Microsoft Visual Basic 5.0 Professional Edition
- Microsoft Visual Basic 6.0 Professional Edition
- Microsoft Visual Basic 5.0 Enterprise Edition
- Microsoft Visual Basic 6.0 Enterprise Edition
This article was previously published under Q201565
SYMPTOMS
When compiling an ActiveX component, you might see the following error message:
If you click Yes, messages similar to the following might appear:
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.
MORE INFORMATION
The Export file (.exp) and Import Library file (.lib) are created in a Visual Basic project directory when, for example, you compile a component project. These files are actually Visual C++ files. Their purpose is explained in greater detail in Visual C++ Help files.
One typical scenario in which these files might unexpectedly become read-only is if they are manually added to source control through the Visual SourceSafe Explorer. Unchecked out files in Visual SourceSafe are marked read-only. Microsoft recommends that you not place these types of files under source control. And, if you have such files currently under source control, you should remove them.
NOTE: This problem is not specific to Visual SourceSafe. Simply changing the file's attribute manually, or by any other process, to read-only would be sufficient to reproduce this behavior.
Steps to Reproduce Behavior
- Create an ActiveX DLL project and save it.
- Compile the project. (This step creates the .lib and .exp files.)
- Next, from project's compile directory in Windows Explorer, right-click either the .lib or .exp file and select Properties to change the file's attribute to read-only.
- Compile the project again to the same directory as used in Step 2.
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.
Additional query words: kbDSupport export
Keywords: kbprb KB201565