Using tesseract in a mingw program

181 views
Skip to first unread message

Denis Gottardello

unread,
Jul 19, 2013, 5:31:21 AM7/19/13
to tesser...@googlegroups.com
Hi everybody. I'm trying to use tesseract in a Qt 5.1 mingw program. On Linux all works well but on Windows I have some problems.
I have compiled leptonica without problems but I obtain an error with tesseract:


Denis@4ae2a7ce7cd1409 /c/home/denis/Cpp/tesseract-ocr
$ ./autogen.sh
Running aclocal
Running libtoolize
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `config'.
libtoolize: copying file `config/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
Running autoheader
Running automake --add-missing --copy
Running autoconf

All done.
To build the software now, do something like:

$ ./configure [--enable-debug] [...other options]
$ make

Denis@4ae2a7ce7cd1409 /c/home/denis/Cpp/tesseract-ocr
$ LDFLAGS="-no-undefined  -Wl,--as-needed" \
>   ./configure --disable-tessdata-prefix
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking --enable-graphics argument... yes
checking --enable-embedded argument... no
checking --enable-visibility argument... no
checking --enable-multiple-libraries argument... no
checking whether to use tessdata-prefix... no
checking whether to enable debugging... no
checking for cl.exe... no
checking for g++... no
checking whether the C++ compiler works... no
configure: error: in `/c/home/denis/Cpp/tesseract-ocr':
configure: error: C++ compiler cannot create executables
See `config.log' for more details



As you can see there are more errors. How can i do to solve the my problem?

The prebuilt dev library are unusable in a mingw program. Is there a package for mingw?

zdenko podobny

unread,
Jul 20, 2013, 4:54:01 AM7/20/13
to tesser...@googlegroups.com
Maybe you can install mingw correct way;-) "checking for g++... no" is quite fatal information... 
You can follow my instruction[1]. I am testing also newer versions of libs, but I need some time for testing...


Zdenko
 

nge...@gmail.com

unread,
Jul 14, 2014, 2:21:36 PM7/14/14
to tesser...@googlegroups.com
Hello Zdenko,

I have followed instructions on your page [1] but every time i use the option "-no-undefined' , i have the same error message as Denis.
(i.e. , checking whether the C++ compiler works... no; configure: error: CC compiler cannot create executables). 
But if i delete this option (so, by using only  LDFLAGS="-Wl,--as-needed"),  no more error message.
And this time the command configure send "checking the C++ compiler works... yes".
What can i do to resolve this problem ? Is it very important to use option no-undefined ?

Thank you very much for your response,

Ngege.
Reply all
Reply to author
Forward
0 new messages