Hello!

me and my friend trying to port tesseract to android.
Tesseract is an open source optical character recognition software
first developed by HP now by Google.
http://code.google.com/p/tesseract-ocr

This tesseract project is an external android project
http://android.git.kernel.org/?p=platform/external/tesseract.git;a=summarybut

We try to compile it with the android NDK. We try to compile all the
modules as a static library, expect libtesseract which we try as
shared library.
But we got this compile error message included at the end of the
letter.
Could anybody help what to do?
Is it possible to compile tesseract with the android NDK?
Or is it impossible, or does it need some code to change?

thanks
Tom


In file included from sources/tesseract/dict/
patternfst.h:10,
               from sources/tesseract/dict/fstmodel.h:8,
               from sources/tesseract/dict/permute.cpp:36:
sources/tesseract/dict/wordfst.h:10:36: error: nlp/fst/lib/fstlib-
inl.h: No such file or directory
sources/tesseract/dict/wordfst.h:12:43: error: third_party/libidn/
stringprep.h: No such file or directory
sources/tesseract/dict/wordfst.h:13:36: error: util/utf8/
unicodeprops.h: No such file or directory
sources/tesseract/dict/wordfst.h:14:51: error: third_party/icu/current/
unicode/uchar.h: No such file or directory
sources/tesseract/dict/wordfst.h:15:39: error: i18n/utf8/
char_properties.h: No such file or directory
In file included from sources/tesseract/dict/permute.cpp:39:
sources/tesseract/cutil/const.h:52:1: warning: "MAXFLOAT" redefined
In file included from sources/tesseract/dict/permute.cpp:33:
build/platforms/android-1.5/arch-arm/usr/include/math.h:164:1:
warning: this is the location of the previous definition
In file included from sources/tesseract/dict/patternfst.h:10,
               from sources/tesseract/dict/fstmodel.h:8,
               from sources/tesseract/dict/permute.cpp:36:
sources/tesseract/dict/wordfst.h:18: error: expected initializer
before '<' token
sources/tesseract/dict/wordfst.h:22: error: expected ',' or '...'
before '&' token
sources/tesseract/dict/wordfst.h:22: error: ISO C++ forbids
declaration of 'String' with no type
sources/tesseract/dict/wordfst.h: In member function 'bool
ltstr::operator()(int) const':
sources/tesseract/dict/wordfst.h:23: error: 's1' was not declared in
this scope
sources/tesseract/dict/wordfst.h:23: error: 's2' was not declared in
this scope
sources/tesseract/dict/wordfst.h: At global scope:
sources/tesseract/dict/wordfst.h:44: error: 'nlp_fst' has not been
declared
sources/tesseract/dict/wordfst.h:45: error: 'nlp_fst' has not been
declared
sources/tesseract/dict/wordfst.h:46: error: 'nlp_fst' has not been
declared
sources/tesseract/dict/wordfst.h:47: error: 'nlp_fst' has not been
declared
sources/tesseract/dict/wordfst.h:48: error: 'nlp_fst' has not been
declared
sources/tesseract/dict/wordfst.h:49: error: 'nlp_fst' has not been
declared
sources/tesseract/dict/wordfst.h:50: error: 'nlp_fst' has not been
declared
sources/tesseract/dict/wordfst.h:51: error: 'nlp_fst' has not been
declared
sources/tesseract/dict/wordfst.h:52: error: 'nlp_fst' has not been
declared
sources/tesseract/dict/wordfst.h:59: error: expected ',' or '...'
before '&' token
sources/tesseract/dict/wordfst.h:59: error: ISO C++ forbids
declaration of 'String' with no type
sources/tesseract/dict/wordfst.h:64: error: expected ',' or '...'
before '&' token
sources/tesseract/dict/wordfst.h:64: error: ISO C++ forbids
declaration of 'String' with no type
sources/tesseract/dict/wordfst.h:66: error: ISO C++ forbids
declaration of 'StdVectorFst' with no type
sources/tesseract/dict/wordfst.h:66: error: expected ';' before '*'
token
sources/tesseract/dict/wordfst.h:67: error: 'StdVectorFst' has not
been declared
sources/tesseract/dict/wordfst.h:69: error: 'list' has not been
declared
sources/tesseract/dict/wordfst.h:69: error: expected ',' or '...'
before '<' token
sources/tesseract/dict/wordfst.h:75: error: 'nlp_fst' has not been
declared
sources/tesseract/dict/wordfst.h:75: error: ISO C++ forbids
declaration of 'StdVectorFst' with no type
sources/tesseract/dict/wordfst.h:75: error: expected ';' before 'fst_'
sources/tesseract/dict/wordfst.h:79: error: 'list' has not been
declared
sources/tesseract/dict/wordfst.h:79: error: expected ',' or '...'
before '<' token
In file included from sources/tesseract/dict/fstmodel.h:8,
               from sources/tesseract/dict/permute.cpp:36:
sources/tesseract/dict/patternfst.h:19: error: expected ',' or '...'
before '&' token
sources/tesseract/dict/patternfst.h:19: error: ISO C++ forbids
declaration of 'string' with no type
sources/tesseract/dict/patternfst.h:24: error: expected ',' or '...'
before '&' token
sources/tesseract/dict/patternfst.h:24: error: ISO C++ forbids
declaration of 'String' with no type
sources/tesseract/dict/patternfst.h:26: error: expected ',' or '...'
before '&' token
sources/tesseract/dict/patternfst.h:26: error: ISO C++ forbids
declaration of 'String' with no type
sources/tesseract/dict/patternfst.h:38: error: expected ',' or '...'
before '&' token
sources/tesseract/dict/patternfst.h:38: error: ISO C++ forbids
declaration of 'String' with no type
sources/tesseract/dict/patternfst.h:42: error: 'list' has not been
declared
sources/tesseract/dict/patternfst.h:42: error: expected ',' or '...'
before '<' token
sources/tesseract/dict/patternfst.h:44: error: expected ',' or '...'
before '&' token
sources/tesseract/dict/patternfst.h:44: error: ISO C++ forbids
declaration of 'string' with no type
sources/tesseract/dict/patternfst.h:46: error: expected ',' or '...'
before '&' token
sources/tesseract/dict/patternfst.h:46: error: ISO C++ forbids
declaration of 'string' with no type
sources/tesseract/dict/patternfst.h:47: error: expected ',' or '...'
before '&' token
sources/tesseract/dict/patternfst.h:47: error: ISO C++ forbids
declaration of 'string' with no type
sources/tesseract/dict/patternfst.h:54: error: 'nlp_fst' has not been
declared
sources/tesseract/dict/patternfst.h:54: error: ISO C++ forbids
declaration of 'StdVectorFst' with no type
sources/tesseract/dict/patternfst.h:54: error: expected ';' before
'fst_'
sources/tesseract/dict/patternfst.h:58: error: ISO C++ forbids
declaration of 'map' with no type
sources/tesseract/dict/patternfst.h:58: error: expected ';' before '<'
token
sources/tesseract/dict/patternfst.h:66: error: ISO C++ forbids
declaration of 'map' with no type
sources/tesseract/dict/patternfst.h:66: error: expected ';' before '<'
token
sources/tesseract/dict/patternfst.h:71: error: ISO C++ forbids
declaration of 'vector' with no type
sources/tesseract/dict/patternfst.h:71: error: expected ';' before '<'
token
sources/tesseract/dict/patternfst.h:74: error: ISO C++ forbids
declaration of 'vector' with no type
sources/tesseract/dict/patternfst.h:74: error: expected ';' before '<'
token
sources/tesseract/dict/patternfst.h:77: error: 'String' does not name
a type
sources/tesseract/dict/patternfst.h:80: error: 'String' does not name
a type
sources/tesseract/dict/patternfst.h:84: error: ISO C++ forbids
declaration of 'vector' with no type
sources/tesseract/dict/patternfst.h:84: error: expected ';' before '<'
token
sources/tesseract/dict/patternfst.h:87: error: 'string' does not name
a type
sources/tesseract/dict/patternfst.h:88: error: 'String' does not name
a type
In file included from sources/tesseract/dict/permute.cpp:36:
sources/tesseract/dict/fstmodel.h:10: error: 'uint32' was not declared
in this scope
sources/tesseract/dict/fstmodel.h:11: error: 'uint32' does not name a
type
sources/tesseract/dict/fstmodel.h:16: error: expected ',' or '...'
before '&' token
sources/tesseract/dict/fstmodel.h:16: error: ISO C++ forbids
declaration of 'string' with no type
sources/tesseract/dict/fstmodel.h:19: error: expected ',' or '...'
before '&' token
sources/tesseract/dict/fstmodel.h:19: error: ISO C++ forbids
declaration of 'String' with no type
sources/tesseract/dict/permute.cpp: In member function 'void
tesseract::Dict::init_permute()':
sources/tesseract/dict/permute.cpp:1065: error: invalid conversion
from 'const char*' to 'int'
sources/tesseract/dict/permute.cpp:1065: error:   initializing
argument 1 of 'void LanguageModel::InitWithLanguage(int)'
make: *** [out/apps/tesseract/android-1.5-arm/objs/ocr/dict/permute.o]
Error 1

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to