Archived:Compiling a component using static libraries in CodeWarrior
Generally the static library is referenced in the .mmp file as follows:
Select the appropriate version to be built for, for example GCCE or ARMV5 (UDEB or UREL), and build it. If the compilation is successful, the corresponding static library is generated and ready for use.
Declare the following in the .mmp file of the application which uses this static library:
The application will look for the .dso file for linking. However, static libraries do not have a .dso file but only a .lib file, but this can be configured as follows:
Within CodeWarrior's project file structure view, for example, App.mcp, go to Libraries, select the already existing (for example, xxx.dso) library, and delete it.
There are two ways to add a static library:
- Right-click on the specific version (gcce/armv5) you are building for and select Add Files... Go to the existing path of the generated static library and add it. Then build the application.
- Locate the path of the generated static library. Drag and drop the library into the specific version of the build (gcce/armv5).
This way, an application which uses the static library can be compiled in CodeWarrior.