Installing and using Leptonica library on Windows with Visual Studio

905 Views Asked by At

What I did:

  1. Downloaded sw, leptonica source and cmake.
  2. Executed 'ms build' in leptonica source directory -> '.sw' folder.
  3. Build a visual studio project from the leptonica source with cmake -> 'build' folder.
  4. Opened the project and build it (debug, 64x) -> 'leptonica-1.82.0d.lib' file.
  5. Created a new project (debug, 64x) and included leptonica 'allheaders.h' file.
    • Additional Include Directories:
      • C:...\c++ libraries
      • C:...\c++ libraries\leptonica-1.82.0\build\src (for endianness.h)
  6. Linked 'leptonica-1.82.0d.lib':
    • Additional Library Directory:
      • C:...\c++ libraries\leptonica-1.82.0\build\src\Debug
    • Additional Dependencies:
      • leptonica-1.82.0d.lib

When I want to execute the following program, I get many 'unresolved external symbol' errors.

#include <leptonica-1.82.0/src/allheaders.h>
int main()
{
    Pix* image = pixRead("imagePath");
}

What am I missing? Is there an additional DLL file?

0

There are 0 best solutions below