Hi, all.
I'm trying to do this, but failed.

The first thing I do is build leptonica-1.68 and installed to /mingw (the 
MinGW folder is mounted to /mingw under MSYS)

Then I try to run the configure under Tesseract-ocr folder, and it failed 
to detect the leptonica library, so I manually change the configure.ac, and 
set the correct path. looks like:


have_lept=no
> if test "$LIBLEPT_HEADERSDIR" = "" ; then
>   LIBLEPT_HEADERSDIR="/mingw/include /usr/include"
> fi
> for incd in $LIBLEPT_HEADERSDIR
> do
>   for lept in . leptonica liblept
>   do
>     if test -r "$incd/$lept/allheaders.h" ; then
>       CPPFLAGS="$CPPFLAGS -I$incd/$lept"
>       have_lept=yes
>     fi
>   done
> done
> if test "$have_lept" = yes ; then
>   AC_MSG_RESULT(yes)
>   AC_CHECK_LIB(lept,pixCreate,[], AC_MSG_ERROR([leptonica library 
> missing]), [-lz])
> else
>   AC_MSG_ERROR([leptonica not found])
> fi
>

Then, I just run the command:

$ make CPPFLAGS="-D__MSW32__ -D_tagBLOB_DEFINED"

The second macro definition is try to work around the BLOB definition 
conflict.

But later, I still failed with many build errors, like:

libtool: link: ( cd ".libs" && rm -f "libtesseract.la" && cp -p 
> "../libtesseract.la" "libtesseract.la" )
> /bin/sh ../libtool --tag=CXX   --mode=link g++  -g -O2   -o tesseract.exe 
> tesseractmain.o libtesseract.la -llept -lpthread 
> libtool: link: g++ -g -O2 -o .libs/tesseract.exe tesseractmain.o  
> ./.libs/libtesseract.a -L./ -L../ -L../api -L../ccutil -L../viewer 
> -L../cutil -L../image -L../ccstruct -L../dict -L../classify -L../wordrec 
> -L../neural_networks/runtime -L../textord -L../cube -L../ccmain 
> /mingw/lib/liblept.a -lz -lgdi32 -lpthread
> tesseractmain.o: In function `main':
> e:\project\ch\tesseract-3.01\api/../api/tesseractmain.cpp:100: undefined 
> reference to `tesseract::TessBaseAPI::TessBaseAPI()'
> e:\project\ch\tesseract-3.01\api/../api/tesseractmain.cpp:102: undefined 
> reference to `tesseract::TessBaseAPI::SetOutputName(char const*)'
> e:\project\ch\tesseract-3.01\api/../api/tesseractmain.cpp:104: undefined 
> reference to `tesseract::TessBaseAPI::Init(char const*, char const*, 
> tesseract::OcrEngineMode, char**, int, GenericVector<STRING> const*, 
> GenericVector<STRING> const*, bool)'
> e:\project\ch\tesseract-3.01\api/../api/tesseractmain.cpp:117: undefined 
> reference to `tesseract::TessBaseAPI::GetPageSegMode() const'
> e:\project\ch\tesseract-3.01\api/../api/tesseractmain.cpp:120: undefined 
> reference to `tesseract::TessBaseAPI::Version()'
> e:\project\ch\tesseract-3.01\api/../api/tesseractmain.cpp:137: undefined 
> reference to `STRING::STRING()'
> e:\project\ch\tesseract-3.01\api/../api/tesseractmain.cpp:138: undefined 
> reference to `tesseract::TessBaseAPI::ProcessPages(char const*, char 
> const*, int, STRING*)'
> e:\project\ch\tesseract-3.01\api/../api/tesseractmain.cpp:142: undefined 
> reference to `tesseract::TessBaseAPI::GetBoolVariable(char const*, bool*) 
> const'
> e:\project\ch\tesseract-3.01\api/../api/tesseractmain.cpp:144: undefined 
> reference to `tesseract::TessBaseAPI::GetBoolVariable(char const*, bool*) 
> const'
> e:\project\ch\tesseract-3.01\api/../api/tesseractmain.cpp:145: undefined 
> reference to `STRING::STRING(char const*)'
> e:\project\ch\tesseract-3.01\api/../api/tesseractmain.cpp:146: undefined 
> reference to `STRING::operator+=(char const*)'
> e:\project\ch\tesseract-3.01\api/../api/tesseractmain.cpp:147: undefined 
> reference to `STRING::string() const'
> e:\project\ch\tesseract-3.01\api/../api/tesseractmain.cpp:152: undefined 
> reference to `STRING::length() const'
> e:\project\ch\tesseract-3.01\api/../api/tesseractmain.cpp:152: undefined 
> reference to `STRING::string() const'
> e:\project\ch\tesseract-3.01\api/../api/tesseractmain.cpp:145: undefined 
> reference to `STRING::~STRING()'
> e:\project\ch\tesseract-3.01\api/../api/tesseractmain.cpp:137: undefined 
> reference to `STRING::~STRING()'
> e:\project\ch\tesseract-3.01\api/../api/tesseractmain.cpp:100: undefined 
> reference to `tesseract::TessBaseAPI::~TessBaseAPI()'
> e:\project\ch\tesseract-3.01\api/../api/tesseractmain.cpp:118: undefined 
> reference to 
> `tesseract::TessBaseAPI::SetPageSegMode(tesseract::PageSegMode)'
> e:\project\ch\tesseract-3.01\api/../api/tesseractmain.cpp:149: undefined 
> reference to `STRING::string() const'
> e:\project\ch\tesseract-3.01\api/../api/tesseractmain.cpp:137: undefined 
> reference to `STRING::~STRING()'
> e:\project\ch\tesseract-3.01\api/../api/tesseractmain.cpp:100: undefined 
> reference to `tesseract::TessBaseAPI::~TessBaseAPI()'
> e:\project\ch\tesseract-3.01\api/../api/tesseractmain.cpp:56: undefined 
> reference to `tesseract::TessBaseAPI::Version()'
> e:\project\ch\tesseract-3.01\api/../api/tesseractmain.cpp:145: undefined 
> reference to `STRING::~STRING()'
> collect2: ld returned 1 exit status
> make[2]: *** [tesseract.exe] Error 1
> make[2]: Leaving directory `/e/project/ch/tesseract-3.01/api'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/e/project/ch/tesseract-3.01'
> make: *** [all] Error 2
>
>
Hope someone can help me.

Thank you.
 

 

-- 
You received this message because you are subscribed to the Google
Groups "tesseract-ocr" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/tesseract-ocr?hl=en

Reply via email to