×
Namespaces

Variants
Actions

Archived:Compiling a component using static libraries in CodeWarrior

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

CodeWarrior has not been available for sale since Jan 2008, and does not work for current products. Symbian c++ developers should instead use the free Carbide.c++ product.

Article Metadata
Compatibility
Platform(s): S60 3rd Edition, FP1
Article
Created: User:Technical writer 1 (05 Nov 2007)
Last edited: hamishwillee (15 Jun 2012)

Description

Generally the static library is referenced in the .mmp file as follows:

 TARGETTYPE lib 

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:

 STATICLIBRARY xxx.lib 

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.

Solution

There are two ways to add a static library:

  1. 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.
  2. 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.

This page was last modified on 15 June 2012, at 04:28.
90 page views in the last 30 days.
×