Closed hktalent closed 1 year ago
// #cgo CXXFLAGS: -std=c++0x
// #cgo CPPFLAGS: -I/usr/local/include
// #cgo CPPFLAGS: -Wno-unused-result
// #cgo LDFLAGS: -L/usr/local/lib -lleptonica -ltesseract
Same issue here. Were you able to fix it?
@andyrodionov @otiai10 macos:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew install leptonica
brew list leptonica
sudo ln -s /usr/local/Cellar/leptonica/1.83.1 /usr/local/opt/leptonica
sudo ln -s /usr/local/opt/leptonica/lib/libleptonica.6.dylib /usr/local/opt/leptonica/lib/liblept.5.dylib
otool -L /usr/local/opt/leptonica/lib/libleptonica.6.dylib
Tesseract: an open source OCR engine
Leptonica: an image processing library for processing and analyzing images
Jpeg: an image codec library for processing JPEG images
Gzip: a data compression library for compressing and decompressing data
Curl: a network library for accessing network resources
gosseract uses pkg-config to obtain dependencies of third-party libraries. When compiling gosseract, these third-party libraries need to be installed.
Here is a detailed description of gosseract dependencies:
Tesseract: gossiper uses Tesseract for OCR recognition. Tesseract is an open source OCR engine that supports multiple languages and fonts.
Leptonica: gossipact uses Leptonica to process and analyze images. Leptonica is an image processing library that supports multiple image formats.
Jpeg: gossiperact uses Jpeg to process JPEG images. Jpeg is an image codec library that supports the JPEG image format.
Gzip: gossipact uses Gzip to compress and decompress data. Gzip is a data compression library that supports the Gzip compression format.
Curl: gossipact uses Curl to access network resources. Curl is a network library that supports protocols such as HTTP and HTTPS.
In macOS, you can use the following command to install the third-party libraries that gosseract depends on:
brew install tesseract leptonica jpeg gzip curl
In Linux, you can use the following command to install the third-party libraries that gosseract depends on:
sudo apt install tesseract-ocr libleptonica-dev libjpeg-dev zlib1g-dev libcurl4-openssl-dev
goland debug