gosseract: Compilation error

I have followed all your installation instructions to use your great golang package for tesseract-ocr 4.0 (dev) (Windows environment) for golang 1.14 in order to run the example app in your github repo, but unfortunately i get the following error:

# github.com/otiai10/gosseract
tessbridge.cpp:5:34: fatal error: leptonica/allheaders.h: No such file or directory
 #include <leptonica/allheaders.h>
                                  ^
compilation terminated.

For your better assistance, i attach you the following information regarding my golang environment:

info

Any hint would be convenient to me!

Regards

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 18 (5 by maintainers)

Most upvoted comments

I have the same error on mac (big sur 11.2.3). I’m not sure what caused this but for some reason gosseract is looking for includes in some unexpected place, I’ve forked code and changed cpp bridge from: #include <leptonica/allheaders.h> #include <tesseract/baseapi.h> to: #include "/usr/local/include/leptonica/allheaders.h" #include "/usr/local/include/tesseract/baseapi.h"

What is causing this? Am I missing some env variable? Everything installed via brew and tesseract works fine.

Working on it but not able to take so much time currently 🙇