Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Include

Spirit is a header file only library. There are no libraries to link to. To use Spirit X3 simply include:

#include <boost/spirit/home/x3.hpp>

To distinguish between Spirit versions, you can inspect the version file:

#include <boost/spirit/home/x3/version.hpp>

using the preprocessor define

SPIRIT_X3_VERSION

It is a hex number where the first two digits determine the major version while the last two digits determine the minor version. For example:

#define SPIRIT_X3_VERSION 0x3000 // version 3.0

PrevUpHomeNext