I have a CW workspace that contains two projects. The first project is a recognizer and the second is an epocexe server. The recognizer uses the standard mdl UID2 of 0x10003a19 while the epocexe uses a UID2 of 0.
Each project source is in its own subfolder, but they both share the same group folder for CW and mmp files. The folder layout looks like the following:
My problem is that when the mmp files are imported into CW, CW creates a uid.cpp file that contains the UID of the last project to be imported. As long as the uid.cpp file contains the uid of the recognizer, the debug works great. If I have to reimport the mmp file for the server, the uid.cpp file is rewritten with the epocexe UID and then the debugger will not catch breakpoints in the recognizer...even if the recognizer is set as the default project.
The question I have... is the uid.cpp file necessary and if so, can I force CW to create one for each of the projects?
The uid.cpp is used by the WINS(CW) build only.
You have two options:
1. Put the MMP files into separate directories. For example, create a 'group_X' directory for each 'X' mmp. The generated uid.cpp will then automatically go to the right place and the two versions generated for the two projects will not overwite each other.
2. Create two uid_subproj_X.cpp files with the relevant UIDS and add them manually to the corresponding codewarrior project. When you (re)import one of the projects, remove the (re)generated uid.cpp.
In this case, however, you must make sure that a change of the UID in a project is reflected in your uid_subproj_X.cpp file.