All Open Class executables must use the following options:
gen(rtti, yes) link(padding, no) lang(nokeyword, "bool") lang(nokeyword, "true") lang(nokeyword, "false") link(linkwithmultithreadlib, yes)
To use dynamic linking, specify link(linkwithsharedlib, yes), to use static linking specify link(linkwithsharedlib, no).
| Note: |
The Open Class Library reserves the use of #pragma priority values in the range of -2147482624 through -2147481600. The C++ compiler reserves the range below that. As a result, avoid using a #pragma priority value less than -2147481599 (this is equivalent to INT_MIN + 2048) to control the order of static object construction in your Open Class Library application.
Although Open Class is designed to catch as many errors as possible during the compilation and link steps, some errors can only be detected at run time. The classes in Open Class throw C++ exceptions to indicate runtime errors. Errors messages describing the exception can be seen while debugging, or can be seen in trace output sent to STDOUT, STDERR or a queue; trace output is only seen if you have turned tracing on. Your own classes can also throw C++ exceptions and output trace information in the same way, by using classes provided in Open Class.
"On OS/2 and Windows, you do not need to specify which libraries to use because this happens automatically via #pragma library statements. Only if you build with the link(defaultLibs,no) will you need to manually include the names of the import libraries (if dynamically linking) or object libraries (if statically linking).
On AIX, you must specify exactly which libraries should be used.
The following additional rules apply when you build your application with the dynamic libraries, instead of the static object libraries:
Note: The cpporr40.dll file is the resource DLL used by the Open Class Library for resources that we provide (such as tool bar button bitmaps, animated buttons, bitmaps, container direct manipulation icons, and more). Because this file is loaded dynamically, you need the file when your application is statically or dynamically linked.
You can set the environment variable ICLUI_RESLIB or use ICurrentApplication::setResourceLibrary() to change the default name of this DLL.
Link your AIX application to the Open Class Library by specifying either the non-shared (static) or shared libraries at link time. For the static libraries, the letter s is not appended to the filename. When specifying the shared libraries at link time, append the letter s to the filename.
Note: The first four letters of the CCL controls library (CPPOQI40.DLL) should be the same as the first four letters of the UI classes library (CPPOUI40.DLL) for dynamically linked applications. If your application statically links with the CCL controls library, you may also use the first four letters of your executables instead of those of the UI classes library.
![]()
Tracing Exceptions
Following Conventions
