64-Bit Windows DLL

3,104 views
Skip to first unread message

troplin

unread,
Sep 24, 2012, 3:57:51 AM9/24/12
to tesser...@googlegroups.com
Hello,
 
since the installer for Windows will contain the libtesseract DLL in the next version (v 3.02), I'd suggest to build and distribute it also for 64-Bit machines.
This would require to build all dependencies (leptonica, zlib, jpeg, gif etc.) for 64-Bit too, which is why I didn't try it so far.
 
I don't see any major problems, in fact I already compiled v 2.04 (without leptonica support however) for 64-Bit at some time in the past, and it worked flawlessly.
 
Any thoughts?
 
Tobi

James Le Cuirot

unread,
Sep 24, 2012, 4:04:40 AM9/24/12
to tesser...@googlegroups.com, tro...@gmail.com
Leptonica and its dependencies should build just fine for 64-bit
Windows, at least when using MinGW, because I fixed it some time ago.
Following that, I think Tom Powers ensured it also worked for MSVC. I
don't know about Tesseract itself. Try it and see. :)

troplin

unread,
Sep 24, 2012, 4:42:57 AM9/24/12
to tesser...@googlegroups.com, tro...@gmail.com

Am Montag, 24. September 2012 10:04:43 UTC+2 schrieb James Le Cuirot:

Leptonica and its dependencies should build just fine for 64-bit
Windows, at least when using MinGW, because I fixed it some time ago.

Following that, I think Tom Powers ensured it also worked for MSVC.

That's what I suspected.
 

I don't know about Tesseract itself. Try it and see. :)

Well, since there exist prebuilt 32-Bit binaries for all dependencies, I assumed that someone must have created vs2008 Projects for all those already. Personally, I would need to setup all those projects again, which I would like to avoid if possible. My available time for working on tesseract is a bit limited.
 
Creating a 64-Bit configuration for tesseract itself is probably not difficult at all and I would certainly volunteer to create a patch for that.
 
Tobi

zdenko podobny

unread,
Sep 27, 2012, 1:55:38 PM9/27/12
to tesser...@googlegroups.com, tro...@gmail.com
Well I am able to create only 32bit version (I have access only to Windows XP SP3 and VC++2008 Express). So please feel free to create 64bit (and 32bit ;-) ) version + installer. I did installer because there was nobody else...

--
Zdenko

Tom Powers

unread,
Sep 27, 2012, 4:48:23 PM9/27/12
to tesser...@googlegroups.com
On Mon, Sep 24, 2012 at 12:57 AM, troplin <tro...@gmail.com> wrote:
> since the installer for Windows will contain the libtesseract DLL in the
> next version (v 3.02), I'd suggest to build and distribute it also for
> 64-Bit machines.
> This would require to build all dependencies (leptonica, zlib, jpeg, gif
> etc.) for 64-Bit too, which is why I didn't try it so far.
>

My personal take on this is why go to all the bother? 32-bit apps work
fine on 64 bit Windows. Are people really crying for it? I doubt if
anyone really needs it to do OCR. The trend (based on the questions on
the main tesseract-ocr group) is people wanting to run on LESS
powerful hardware (like IOS or Android).

On my own Windows 7 64bit system that I built about 6 months ago
(admittedly a tiny sample):

64 folders in C:\Program Files\ which is where 64bit apps get
installed (over half of which look to be made by Microsoft)

127 folders in C:\Program Files (x86) (about a quarter made by Microsoft).

Taking a quick glance at the 64-bit apps, I honestly don't see any
that really *need* to be 64-bit. Having a 64bit OS is nice. You get to
use all that memory to run lots of big apps at the same time. In
particular it's nice when you are running say Ubuntu as a virtual
machine. 64bit apps? not so much. IMO, if people want to get higher
performance OCR they should try multiprocessing instead.

Whenever the next version of leptonica comes out, I currently have no
plans on providing 64bit DLLs (mainly because I don't relish the
hassle of building all the prerequisite image libraries). I already
have to build and test 4 configurations (over and over and over again
during the release process). Until someone demonstrates to me that
there is a strong, reasonable demand, I'm not going to volunteer to
double that amount.

-- Tom

troplin

unread,
Sep 28, 2012, 3:12:39 AM9/28/12
to tesser...@googlegroups.com

Am Donnerstag, 27. September 2012 22:48:46 UTC+2 schrieb Tom Powers:
On Mon, Sep 24, 2012 at 12:57 AM, troplin <tro...@gmail.com> wrote:
> since the installer for Windows will contain the libtesseract DLL in the
> next version (v 3.02), I'd suggest to build and distribute it also for
> 64-Bit machines.
> This would require to build all dependencies (leptonica, zlib, jpeg, gif
> etc.) for 64-Bit too, which is why I didn't try it so far.
>

My personal take on this is why go to all the bother? 32-bit apps work
fine on 64 bit Windows. Are people really crying for it? I doubt if
anyone really needs it to do OCR. The trend (based on the questions on
the main tesseract-ocr group) is people wanting to run on LESS
powerful hardware (like IOS or Android).
 
We have a tesseract plugin for our software, which is mainly used for high volume, high performance processing.
Since we sell programming components ourselfs, we usually let our customers decide, if they want to use 32-bit or 64-bit components. Often they don't have a real choice, because they have to integrate the components into existing software.
 
But I also know that we are probably not the typical tesseract users.
 
On my own Windows 7 64bit system that I built about 6 months ago
(admittedly a tiny sample):

 64 folders in C:\Program Files\ which is where 64bit apps get
installed (over half of which look to be made by Microsoft)

 127 folders in C:\Program Files (x86) (about a quarter made by Microsoft).
 
But those are all Applications, not DLLs.
 

Taking a quick glance at the 64-bit apps, I honestly don't see any
that really *need* to be 64-bit. Having a 64bit OS is nice. You get to
use all that memory to run lots of big apps at the same time. In
particular it's nice when you are running say Ubuntu as a virtual
machine. 64bit apps? not so much. IMO, if people want to get higher
performance OCR they should try multiprocessing instead.  

In a multithreaded application that does the OCR in-process, memory can easily be a problem, especially with big images.
 

Whenever the next version of leptonica comes out, I currently have no
plans on providing 64bit DLLs (mainly because I don't relish the
hassle of building all the prerequisite image libraries). I already
have to build and test 4 configurations (over and over and over again
during the release process). Until someone demonstrates to me that
there is a strong, reasonable demand, I'm not going to volunteer to
double that amount.

At the moment, we don't have any specific requests for a 64-bit version, but they will come for sure.
I just thought that now it would be a good moment to discuss it, since 3.02 is nearly completed and it will be the first version containing the DLL in the windows installer.
 
Tobi
 

Imad Bougataya

unread,
Dec 24, 2013, 11:51:51 AM12/24/13
to tesser...@googlegroups.com
There's a problem when integrating tesseract into java server applications. Usually, you want to use x64 components to optimize the use of ressources, but it is impossible to mix 32bits with x64. There is a real need for x64 tesseract dlls in my opinion, and i would very much like to find that dll somewhere since i do not have enough proficiency with visual studio and c++ to compile one myself

zdenko podobny

unread,
Dec 24, 2013, 4:47:52 PM12/24/13
to tesser...@googlegroups.com
Have a look at https://github.com/charlesw/tesseract/tree/master/src/lib/TesseractOcr/x64
If you need commercial support have a look at http://www.devscope.net/products/DevScopeOCR
(search tesseract forums for "DevScopeOCR" for announcement).

Zdenko


--
You received this message because you are subscribed to the Google Groups "tesseract-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-de...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Quan Nguyen

unread,
Dec 29, 2013, 10:16:43 PM12/29/13
to tesser...@googlegroups.com
Thanks, Zdenko. The 64-bit DLLs from Tesseract .NET wrapper project seem to work well with Tess4J on 64-bit JVM.

Quan

Charles Weld

unread,
Feb 1, 2014, 7:13:11 AM2/1/14
to tesser...@googlegroups.com
If for some reason someone need to build the dependencies on windows you can find them here https://github.com/charlesw/tesseract-vs2012, there's also a dev3.03 branch which has been updated to leptonica 1.70 which compiles for windows x86 and x64. However I haven't updated the tesseract project under it yet (will do that once the 3.03 is released). Note the 3.03 branch requires VS 2013 (Express works fine).

zdenko podobny

unread,
Feb 1, 2014, 7:15:40 AM2/1/14
to tesser...@googlegroups.com
Is it possible to build 64bit lib with VS 2013 Express?

Zdenko

Charles Weld

unread,
Feb 1, 2014, 7:29:19 AM2/1/14
to tesser...@googlegroups.com
Yes should work, VS Express now includes 64bit compilers.

Quan Nguyen

unread,
Feb 1, 2014, 12:33:24 PM2/1/14
to tesser...@googlegroups.com
Quite a few developers were asking for 64-bit DLLs. It'd be welcome if 64-bit support is integrated in the trunk.

Charles Weld

unread,
Feb 2, 2014, 5:14:17 AM2/2/14
to tesser...@googlegroups.com
FYI I've attached a patch that adds a new VS 2013 solution that also includes a x64 platform configuration. It's basically the same as the existing vs2010 solution except mathfix.h has been commented out since VS 2013 now correctly implements the C99 standard (as far as I can tell anyway). Also please note the zlib version number has been updated to 128 in ~\vs2013\include\leptonica_versionnumbers.props as that's the version I was compiling against in the previously mentioned tesseract dependencies repo (https://github.com/charlesw/tesseract-vs2012/tree/3.03). 

I've also done a bit of work on said dependency project so there's now a build script and it will generate all the static libs and dlls using the naming conversion expected by tesseract so you should just be able to just drop the output were Tesseract's Visual Studio project looks for them.

Finally please note I haven't extensively tested any of this, just made sure it compiles and can OCR 'phototest.tiff'.

Cheers,
Charles
vs2013+64bit support.patch

Joe Chan

unread,
Apr 25, 2014, 5:16:53 PM4/25/14
to tesser...@googlegroups.com
Any chances that you could provide vs2008+64bit. To build 64bit python-tesseract, I need  vs2008 64bit built of libtesseract302.lib.

Thank in advance for your help

Charles Weld

unread,
Apr 26, 2014, 12:45:05 AM4/26/14
to tesser...@googlegroups.com

Sorry I don't have access to visual studio 2008.

You received this message because you are subscribed to a topic in the Google Groups "tesseract-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tesseract-dev/WhKDNnWRJ5Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tesseract-de...@googlegroups.com.
To post to this group, send email to tesser...@googlegroups.com.
Visit this group at http://groups.google.com/group/tesseract-dev.
To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-dev/2058c208-8922-4ced-92df-b186f53627fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Max Pole

unread,
Apr 29, 2014, 9:14:50 AM4/29/14
to tesser...@googlegroups.com

Am Freitag, 25. April 2014 23:16:53 UTC+2 schrieb Joe Chan:
Any chances that you could provide vs2008+64bit. To build 64bit python-tesseract, I need  vs2008 64bit built of libtesseract302.lib.

I've managed to compile Tesseract under VS 2008 for both x86 and x64 architectures. It was a royal pain in the a** because the VS express doesn't include the 64bit compiler and is full of bugs you have to work around. I'm asking myself how someone was able to do smth useful with such a horrible foundation tool...

Anyway, I could share my libs with you if you want. Just contact me at maximumspatium at googlemail dot com

Best regards
Maxim

Charles Weld

unread,
May 7, 2014, 6:29:30 AM5/7/14
to tesser...@googlegroups.com

Thanks for the offer however I think ill keep to vs 2013 so I can compile the libs.

--
You received this message because you are subscribed to a topic in the Google Groups "tesseract-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tesseract-dev/WhKDNnWRJ5Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tesseract-de...@googlegroups.com.
To post to this group, send email to tesser...@googlegroups.com.
Visit this group at http://groups.google.com/group/tesseract-dev.
Reply all
Reply to author
Forward
0 new messages