Pre-C++11 Compatibility

The NxLib C++ headers require C++11 by default. Although it is not recommended, you can enable a compatibility mode by defining the macro NXLIB_CPP_COMPATIBILITY_MODE before including any NxLib headers:

#define NXLIB_CPP_COMPATIBILITY_MODE
#include "nxLib.h"

Note that the define has to be added to all files which include the NxLib headers. Alternatively, you can also set up your compiler to add the definition for all source files.

Note

In compatibility mode, the NxLibCommand still creates a temporary execution slot in its constructor. This slot gets deleted in the destructor of the command. When you handle an NxLibException outside of the command’s scope you can therefore no longer access the error nodes in the command slot. This is different from the normal behavior with C++11, where the destruction of the slot gets delayed until the exception goes out of scope as well.