Friday, October 28, 2011

[Resolved] Clojure + Tesseract + OSX

Trying to get https://github.com/antoniogarrote/clj-tesseract working on OS/X?
Here's the fix assuming you've brew install tesseract:
diff --git a/microcr/Makefile b/microcr/Makefile
index 90abace..67b841a 100644
--- a/microcr/Makefile
+++ b/microcr/Makefile
@@ -1,5 +1,5 @@
-INCLUDES = -I/opt/local/include/tesseract `pkg-config --cflags opencv`
-LIBS = -L/opt/local/lib -ltesseract_api `pkg-config --libs opencv`
+INCLUDES = -I/usr/local/Cellar/tesseract/3.00/include/tesseract `pkg-config --cflags opencv`
+LIBS = -L/usr/local/Cellar/tesseract/3.00/lib -ltesseract_api `pkg-config --libs opencv`
DYLIB = -arch x86_64 -dynamiclib -o libmicrocr.dylib
INSTALL_PATH = -install_name /usr/local/lib/microcr/libmicrocr.dylib
CC = g++
diff --git a/microcr/src/image.h b/microcr/src/image.h
index db335cd..bb11a91 100644
--- a/microcr/src/image.h
+++ b/microcr/src/image.h
@@ -1,8 +1,10 @@
#ifndef __IMAGE_H__
#define __IMAGE_H__
+#include
#include
#include
+using namespace std;
class Image
{

0 comments: