= lcb_get_version(3couchbase) :doctype: manpage Trond Norbye NAME ---- lcb_get_version - get library version SYNOPSIS -------- cc [ flag ... ] file... -lcouchbase [ library ... ] #include const char *lcb_get_version(lcb_uint32_t *version); DESCRIPTION ----------- lcb_get_version is used to retrieve version information of libcouchbase. If version is set to a non-null value, the version information of the library is stored there in the following format: 0x00MMmmrr where MM represent the major version number, mm represent the minor version number and rr represents the release number. Note that this does not return the version of the server(s) to which this client may be attached. That information is available through a statistics request. RETURN VALUES ------------- lcb_get_version() returns a textual rescription of the version number. EXAMPLES -------- #include ... lcb_uint32_t ver; const char *msg = lcb_get_version(&ver); if ((ver & 0x00ff0000) < 2) { fprintf(stderr, "This piece of code requires at least "); fprintf(stderr, "libcouchbase 2.\n You are using %s\n", msg); } ... ATTRIBUTES ---------- See lcb_attributes(5) for descriptions of the following attributes: [options="header"] |======================================= | ATTRIBUTE TYPE | ATTRIBUTE VALUE | Interface Stability | Committed | MT-Level | MT-Safe |======================================= COPYRIGHT --------- Copyright 2010-2013 Couchbase, Inc. SEE ALSO -------- Learn more at . libcouchbase(3lib), lcb_attributes(5)