Is there an issue with this code or with the C library? Can’t think of a reason why the second printf doesn’t spit the version out. Does this work differently on another platform?
Sorry, forgot to include the obvious. It’s on OS X 10.11.5.
$ gcc -o testVersion testVersion.c -lcouchbase
This is not the libcouchbase from homebrew but a locally compiled version from the libcouchbase-2.6.1.tar.gz package.
$ cbc version
cbc:
Runtime: Version=2.6.1, Changeset=0xdeadbeef
Headers: Version=2.6.1, Changeset=0xdeadbeef
IO: Default=libevent, Current=libevent
SSL: … SUPPORTED
Are you sure you’re using one compiled from the downloaded tarball, or is this one you obtained from GitHub? The build scripts rely that the tarball used is either one generated from make dist (from a Git repository) or from the git repository tree itself. Internal scripts use git describe to derive the current version information (based on Git tags)