2

I have a small program where I use leptonica.. But how can I check which version installed?

#include <leptonica/allheaders.h>
clarkk
  • 27,151
  • 72
  • 200
  • 340

2 Answers2

0

Everything is done at link-time.

If you use dynamic linking, you can specify a version of the library to be linked with, in a compiler-dependant way. For instance, see this question for how it's done with GCC.

If you use static linking, then you know which version you build against because you added the source to your project tree yourself, and you must build the library every time you build your executable.

You cannot get the leptonica version from the API.

Magix
  • 4,989
  • 7
  • 26
  • 50
0

Looking at the source, you can see some macros defined in that same header you imported (near the top):

#define LIBLEPT_MAJOR_VERSION   1
#define LIBLEPT_MINOR_VERSION   76
#define LIBLEPT_PATCH_VERSION   0

You can use these as your guide as to what version you are running

smac89
  • 39,374
  • 15
  • 132
  • 179