1.2.4. Installing on other systems

If you are using a compiler on a platform not directly supported you must setup your own project files for your compiler. All adjustments are done in mockpp.h. To benefit from updates it is of course better to move your own settings to a configuration file and include it.

See config-bcb5.h as an example for Borland's CBuilder.

The following options are used to manually tweak the library:


Enable unicode characters (based on wchar_t) instead of ascii characters.There are some related macros. MOCKPP_PCHAR and MOCKPP_CHAR are used to mark literal character strings either with or without leading "L". MOCKPP_STRING and MOCKPP_PCSTRING are used to create a String variable.


Some platforms export only explicitly tagged elements in dynamic libraries. Other elements can't be linked from other binaries. This macro hides such an export declaration.


Use the built-in alternative STL implementation instead of the STL that comes with the C++ compiler to try to save memory resources. If you use CxxTest CXXTEST_USE_MINI_STL should also be defined.

If you want to use another STL you have to extend the according section in mockpp.h. Search for MOCKPP_USE_MINI_STL and add an appropriate section similar to the one for ministl. Do the same for CxxTest in 3party/cxxtest/cxxtest/Flags.h


Disable all features that are based on runtime type information to reduce the library size.


Disable exception handling to reduce the library size. If you do not use the built-in CxxTest you probably need to adjust the handling of failures. See Section 1.6.2, “The Solution” for a list of the according macros.


Use CppUnit as framework for fow control.


Use CxxTest as framework for fow control.


Use Boost.Test as framework for fow control.


Include source code for ExpectationBoundary::setExpectedDelta()


Derive mockpp::Exception from std::exception


Display non-printable characters in a more readable form.

There are more predefined options of less interest in mockpp.h.

[Note]Once you have ported mockpp to a new platform:

Please send me your files for inclusion in the next distribution. You will certainly make some people happy with this.