Getting Started with C++ Edition Static Libraries
The C++ Editions of /n software's toolkits ship with static libraries that can be used in your application. (Note: For the C++ Editions on Linux and macOS, you'll need to request the obfuscated source code from us, and you'll need to have an active Red Carpet Subscription to do so.)
Before you can declare or use the static components in your application, they must be initialized. Each component in the static libraries has an initialization method and a destruction method. To initialize a static component, use the StaticInit method similar to the following:
// The method name will be in the pattern "[ProductNamespace]_[ComponentName]_StaticInit".
// For example, this is the method you'd use for the Atom component from IPWorks:
IPWorks_Atom_StaticInit(0);
When the application is finished with the static components, they must also be destroyed to ensure any static resources are freed. This can be done using the StaticDestroy methods similar to the following:
// The method name will be in the pattern "[ProductNamespace]_[ComponentName]_StaticDestroy".
// For example, this is the method you'd use for the Atom component from IPWorks:
IPWorks_Atom_StaticDestroy();
It is important to ensure that these methods are called only once for each component. Multiple calls may cause unexpected behavior.
Common errors when using C++ Static Libraries
[10093] Winsock not loaded yet (WSANOTINITIALISED): This error means that the static library is not initialized at all. Please see the example above to initialize the static library.
[10022] Invalid argument: This error means that the static library is initialized after the component is created. Please make sure you initialize the static library before creating the component.
We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at support@nsoftware.com.