I will forward you the scripts I use in mingw as well, though I'm not
sure how much help it will be!

Wil

On Feb 8, 9:47 pm, zdenko podobny <[email protected]> wrote:
> Hi,
>
> Have a look athttps://github.com/zdenop/tesseract-mingw
>
> I was/am testing building tesseract by cmake... just with intention to have
> one build systems for linux, windows and possibly Mac (but I have no Mac
> computer for testing ;-)
>
> I created script (CMakeLists.txt) that was able to compile tesseract (3.02)
> on linux and windows (mingw32 and nmake from vs2008).
>
> BUT mingw version was not able to run ("The application failed to
> initialize properly (0xc000007b)...". When I search why, I identify there
> is problem with usage leptonica library (build by VS2008) in mingw...
>
> Today I remembered that in my older tests 
> (https://github.com/zdenop/QT-Leptonica) Qt Creator was able to use
> leptonica (VS2008 build) in mingw without problem. So I tried to compile
> project in QT Creator and it works (also outside QT Creator) ;-) I guess it
> is should be question of some mingw options (help is welcomed).
>
> Result can be found in above mentioned repository. I had not time for
> testing - I just tried to use tesseract.exe and create test/example for
> using tesseract c++ library.
>
> Zdenko
>
>
>
>
>
>
>
> On Sat, Jan 21, 2012 at 5:08 AM, asmwarrior <[email protected]> wrote:
> > 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

-- 
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