Creating and Using Libraries

Version Control with Shared Libraries

1.Name the first version of your shared library with an extension of .0 (that's the number zero), for example libA.0. Use the +h option to designate the internal name of the library, for example, libA.0:

ld -b *.o -o libA.0 +h libA.0

Creates the shared library libA.0.

2.Since the linker still looks for libraries ending in .sl with the -loption, create a symbolic link from the usual name of the library ending in .sl to the actual library. For example, libA.sl points to libA.0:

ln -s libA.0 libA.sl

libA.sl is a symbolic link to libA.0.

3.Link applications as usual, using the -loption to specify libraries. The linker searches for libA.sl, as usual. However, if the library it finds has an internal name, the linker places the internal name of the library in the executable's shared library dependency list. When you run the application, the dynamic loader loads the library named by this internal name. For example:

ld /opt/langtools/lib/crt0.o prog.o -lA -lc Binds a.out with libA.0.

Creating a New, Incompatible Version of the Library

When you create a new version of the library with incompatible changes, repeat the above steps except increment the number in the suffix of the shared library file name. That is, create libA.1 rather than libA.0 and set the symbolic link libA.sl to point to libA.1. Applications linked with libA.0 continue to run with that library while new applications link and run with libA.1. Continue to increment the suffix number for subsequent incompatible versions, for example libA.2, libA.3, and so forth.

Migrating an Existing Library to Use Library-Level Versioning

If you have an existing library you can start using library-level versioning. First rename the existing library to have the extension .0. Then create the new version of the library with the extension .1 and an internal name using the .1 extension. Create a symbolic link with the extension .sl to point to the .1 library.

Chapter 5

151

Page 151
Image 151
Kenwood HP 9000 manual Creating a New, Incompatible Version of the Library

HP 9000 specifications

The Kenwood HP 9000 is a cutting-edge home appliance designed for culinary enthusiasts seeking to elevate their cooking experience. This powerful kitchen machine stands out for its multi-functionality, combining the roles of a food processor, blender, and mixer into one sleek unit.

One of the flagship features of the Kenwood HP 9000 is its robust motor, which delivers exceptional performance across various tasks. With a powerful motor that operates at multiple speeds, users can tackle everything from kneading dough to finely chopping vegetables with ease. The variable speed control allows for precision, ensuring that every ingredient is processed to perfection according to individual preferences.

The HP 9000 comes equipped with a variety of attachments that enhance its versatility. Among these are a stainless-steel mixing bowl, a dough hook, a whisk, and multiple cutting blades. This extensive array of accessories means that users can whip up delightful pastries, create homemade pasta, or prepare smoothies with minimal hassle. Each attachment is designed for easy attachment and removal, making the transition between tasks seamless and efficient.

Another key characteristic of the Kenwood HP 9000 is its advanced safety features. The design incorporates mechanisms that prevent the machine from operating unless all components are securely in place. This not only gives users peace of mind while cooking but also ensures longevity for the appliance, reducing the risk of wear and tear over time.

In terms of design, the HP 9000 is both modern and aesthetically pleasing. Its ergonomic shape and compact size make it easy to store and use in various kitchen settings, while the high-quality materials used in its construction guarantee durability and longevity. The user interface is intuitive, with clearly labeled buttons that facilitate operation, ensuring that even novice cooks can navigate the machine effortlessly.

Additionally, the Kenwood HP 9000 features innovative technologies, such as an integrated digital timer and a pulse function for added control during food preparation. These features enhance cooking precision, allowing users to achieve consistent results every time.

In summary, the Kenwood HP 9000 is an exceptional kitchen appliance that combines power, versatility, and safety. With its advanced features and user-friendly design, it is an ideal choice for anyone looking to simplify their cooking process while achieving professional-level results. Whether you're whipping up a quick meal or tackling an elaborate recipe, the HP 9000 is a reliable companion that will inspire culinary creativity.