Deleting old objects before building applications
In some cases, it is possible for the linker to link an application using old objects. You can clean out old objects before you build your applications.
About this task
To clean out old objects, use one of the following methods:
- Use the command to delete all compiled object files for the current configuration.
- Use the command every time, which might be time‑consuming for complex systems.
- Modify the start of make within
etc/msmake.bat
and remove the/I
option. Doing this will stop the build after the first source with errors. - Within the site.prp file, change the
CPPCompileCommand
property fromString
toMultiLine
, and change the content so that before a file is compiled, the existing.obj
file is deleted.
For example:CPPCompileCommand Property Metaclass Microsoft: Property CPPCompileCommand MultiLine " if exist $OMFileObjPath erase $OMFileObjPath $(CPP) $OMFileCPPCompileSwitches /Fo\"$OMFileObjPath\" \"$OMFileImpPath\" " Metaclass VxWorks: Property CPPCompileCommand MultiLine " @echo Compiling $OMFileImpPath @$(RM) $OMFileObjPath @$(CXX) $(C++FLAGS) $OMFileCPPCompileSwitches -o $OMFileObjPath $OMFileImpPath"