Hi Khoa,
you have two choices:
- add the .lib file to the project (like a 'true' library): then it is simply using that .lib file and linking it to your elf file/application file. If you do changes in the files creating the library or in your library project, the library will not be re-built. That's useful in case you want to keep the library 'stable'.
- the other thing is you want to rebuild the library whenver something for the library changes. For this add the .mcp (project file) to your application project. Then the build system will check/build the 'subproject' and rebuild the library if needed. If you want to do this, make sure that you go to the 'Targets' Tab of your project and enable the dot under the 'link chain' column: with this the output file of your sub project (the library) will be added to your 'master project'.
This sounds maybe a little bit complicated (gee, a picture here would be easier to understand this), but otherwise you can go into the CW help file index and see what is documented there under the 'subproject' keyword?
Erich