Microsoft KB Archive/199522

= How To Porting Static PowerPC Libraries =

Article ID: 199522

Article Last Modified on 7/1/2004

-

APPLIES TO


 * Microsoft Visual C++ 4.0 Cross Development Edition for Macintosh
 * Microsoft Visual C++ 4.0 Cross Development Edition for Macintosh

-



This article was previously published under Q199522



SUMMARY
To use a static PowerPC library in a Visual C++ Macintosh application, the library must first be converted to a CFM (Code Fragment Manager) Shared Library using a native PowerPC Macintosh development environment. The shared library can then be ported, and linked dynamically. For additional information, please see the following article in the Microsoft Knowledge Base:

145822 DOC: Creating Import Libraries for PowerPC Shared Libraries



MORE INFORMATION
Many Macintosh libraries are delivered as static libraries. There are a number of proprietary formats for 68K static libraries. MPW (Macintosh Programmers Workshop) libraries, usually named with a ".o" extension, are the most common and most interchangeable format. These can be converted to Visual C++ static libraries using MPW2LIB.

PowerPC static libraries cannot be converted using MPW2LIB. PowerPC static libraries must first be converted to shared libraries using a Macintosh development environment other than Visual C++.

In general, a static library can be converted to a shared library by:


 * 1) Creating a new shared library that includes the static library.
 * 2) Exporting the static library's symbols.

The specifics of this process depend on the Macintosh development environment used.

Once a shared library has been created it can be used by Visual C++. For additional information, please see the following article in the Microsoft Knowledge Base:

145822 DOC: Creating Import Libraries for PowerPC Shared Libraries

