To prepare your application for distribution, you must rename any IBM Open Class DLLs used by your application to a name that is consistent with your application. This helps to prevent your application from using incorrect versions of DLLs that may be installed on the end user's system. The runtime environment for your application is located in the \ibmcxxw\runtime or the \ibmcxxo\runtime directory, depending on the operating system. This assumes you have installed the product in the default directory.
The following table lists the IBM Open Class DLLs and the classes that they contain. The x refers to the runtime platform. An o in this position refers to OS/2 and a w refers to Windows.
You can either statically link all of the Open Class Library functions into one executable, or package the Open Class Library DLLs with your application. If you want to package these DLLs, use the DLLRNAME utility against your application and all of the IBM Open Class Library DLLs that your application uses. You can find the DLL names used in your application by examining the application's .MAP file or by executing a DLL search utility.
In the following example .CMD file on OS/2, we rename the DLLs using ALL as the replacement letters for CPPx:
ECHO OFF ECHO PREPARING MYAPP.EXE DLLRNAME MYAPP.EXE CPPOBI36=ALLOBI36 CPPOUI36=ALLOUI36 CPPRMI36=ALLRMI36 CPPORR36=ALLORR36 ECHO PREPARING CPPOBI36.DLL DLLRNAME CPPOBI36.DLL CPPYM36I=ALLYM36I ECHO PREPARING CPPOUI36.DLL DLLRNAME CPPOUI36.DLL CPPOBI36=ALLOBI36 CPPOGI36=ALLOGI36 CPPYM36I=ALLYM36I ECHO PREPARING CPPYM36I.DLL DLLRNAME CPPYM36I.DLL CPPRMI36=ALLRMI36
The AIX library files are installed in the /usr/lpp/xlC/lib directory. The AIX library names are listed below:
Shared Libaries libcxxbase.a libcxxfstrm.a libcxxgraph2d.a libcxxtestfw.a libcxxui.a Non-shared Libraries libcxxbasens.a libcxxfstrmns.a libcxxgraph2dns.a libcxxtestfwns.a libcxxuins.a
In addition to using the previous IBM Open Class Library DLLs, an application can also use resources that are provided in cppxrr36.dll. This DLL contains resources for such items as default drag and drop bitmaps and default tool bar button bitmaps such as Open and Cut.
This must also be renamed if you are shipping it with your application. However, the new name must also be referenced from within your application or the IBM Open Class Library will assume that the resource DLL has the name of cppxrr36.dll. To reference the new DLL name, the setResourceLibrary member function must be executed for IApplication::current. You need to add a line to your application (at the start) to let the class library know about the new name. In this example, the renamed version of is called ALLORR36 is loaded:
IApplication::current().setResourceLibrary("ALLORR36");
DLLRNAME requires that the names be in uppercase.
