Unix and Mac OSX: Exclude unused components during compilation


When using the Unix or Mac OSX editions of our products the overall size of your application can be reduced by including only the components you need during compilation. This will exclude any unused components.

Unix Edition Instructions

With the Unix edition of the toolkit you can set the _IPWORKS_MINSIZE_ compiler define along with a define for each component you wish to include, for instance _INCLUDE_IPWORKS_HTTP_. Any component not included with a define will be excluded.

You can manually modify the source code of the product (ipworks.cpp) and define these values. For instance:

#define _IPWORKS_MINSIZE_
#define _INCLUDE_IPWORKS_HTTP_
Note that this must be done in the product's source code, not in your source code. Alternatively you can define this when compiling the source code from the command line:
g++ -o ipworks.o -c -D _IPWORKS_MINSIZE_ -D _INCLUDE_IPWORKS_HTTP_ ipworks.cpp

Mac OSX Instructions

With the Mac OSX edition you can specify the required values in your project settings from XCode. Navigate to Build Settings and find the Preprocessor Macros line. Add the follow space separated valued:

_IPWORKS_MINSIZE_ _INCLUDE_IPWORKS_HTTP_

We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at support@nsoftware.com.