Question:
When adding a CPP file to a project that has a header file
with the same name but different suffix, C++Builder will say the
project already contains a file by that name and will not
let me add it. How can I add the file?
Answer:
During an "Add File" request, C++Builder will sometimes confuse a
source file for a header file of the same name and refuse to include it.
An example of this is if one has a header file by the name of shape.h
already included in a project and attempts to add the source file
shape.cpp. The project manager will sometimes parse the filename and
ignore the suffix, thus confusing the one file with the other.
Solution:
Manually add the needed files to the Project file.
Example:
Open the project file by opening the Project Manager, right
clicking on the .exe file and selecting "View Source." If the
file to be added is a C or CPP file, add USEUNIT("filename.cpp");.
If the file to be added is a header file, add USE("filename.h", File);
Last Modified: 20-NOV-00