tesseract4 x64 Windows dlls?

962 views
Skip to first unread message

THintz

unread,
Mar 15, 2017, 2:03:02 AM3/15/17
to tesseract-ocr
The current master only builds Win32. Are there x64 builds or build processes available for tesseract4?

THintz

unread,
Mar 15, 2017, 12:14:03 PM3/15/17
to tesseract-ocr
I follow the github instructions tesseract-ocr/tesseract/wiki/Compiling, then opened the resulting .sln file's Configuration Manager... and created an x64 clone of Win32 platform.  Then opened every project an copied the Win32 platform settings to x64 platform while leaving the explicate x64 paths alone.  This compiled on Visual Studio 2017.

ShreeDevi Kumar

unread,
Mar 15, 2017, 11:53:13 PM3/15/17
to tesser...@googlegroups.com
Thanks for sharing how you made the x64 solution for Visual Studio.

ShreeDevi
____________________________________________________________
भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com

On Wed, Mar 15, 2017 at 9:44 PM, THintz <tdh...@gmail.com> wrote:
I follow the github instructions tesseract-ocr/tesseract/wiki/Compiling, then opened the resulting .sln file's Configuration Manager... and created an x64 clone of Win32 platform.  Then opened every project an copied the Win32 platform settings to x64 platform while leaving the explicate x64 paths alone.  This compiled on Visual Studio 2017.

--
You received this message because you are subscribed to the Google Groups "tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-ocr+unsubscribe@googlegroups.com.
To post to this group, send email to tesser...@googlegroups.com.
Visit this group at https://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/ffb9a0b6-badc-4465-9fe0-448b65c9ebf6%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

THintz

unread,
Mar 16, 2017, 9:00:43 AM3/16/17
to tesseract-ocr
I spoke too soon.  Apparently I touched the CMake text and that caused the next build to recreate the solution as Win32.  I think I'm on the right track anyway.

For each project under Solution Explorer in Visual Studio right click and select Properties.  Then make x64 match Win32 Platform's Output Directory and Intermediate Directory under the Configuration Properties | General tab.  Under Configuration Properties | Linker | All Options scroll up to Additional Options and remove /MACHINE:X86.  For some projects this is found under Librarian instead of Linker.

This gets the build as far as linking.  The result is a lot of undefined references.  I presume this occurs because dependent libraries are x86, but I don't know.  Apparently cppan places the dependencies in Build\Release but chooses x86 (because there aren't x64 versions??).  I'm ignorant of the cmake/cppan/git eco system.

Anyone that can give direction I'd welcome your input.

ShreeDevi Kumar

unread,
Mar 16, 2017, 9:50:03 AM3/16/17
to tesser...@googlegroups.com, egor....@gmail.com
Egor (cc:ed) can provide guidance regarding cppan and cmake.

ShreeDevi
____________________________________________________________
भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com

--
You received this message because you are subscribed to the Google Groups "tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-ocr+unsubscribe@googlegroups.com.
To post to this group, send email to tesser...@googlegroups.com.
Visit this group at https://groups.google.com/group/tesseract-ocr.

Egor Pugin

unread,
Mar 16, 2017, 10:21:13 AM3/16/17
to tesseract-ocr, egor....@gmail.com
Configuring arch in VS is the wrong way. 

If you're building with cppan+cmake, run cmake as follows
mkdir win64 && cd win64
cppan ..
cmake .. -G Visual Studio 14 2015 Win64

If you're building with cppan, edit cppan.yml and uncomment this line 
#generator: Visual Studio 14 2015 Win64 -> generator: Visual Studio 14 2015 Win64
Then run 'cppan --generate .' - it will create a solution link for you.

(For VS2017, use '15 2017' instead of '14 2015'.)

Actually non-cppan builds are not maintained well for some time already.

jm

unread,
Mar 16, 2017, 11:13:24 AM3/16/17
to tesseract-ocr
You could also call cmake with

cmake -DCMAKE_GENERATOR_PLATFORM=x64 ..

jm



On Thursday, March 16, 2017 at 4:53:13 AM UTC+1, shree wrote:
Thanks for sharing how you made the x64 solution for Visual Studio.

ShreeDevi
____________________________________________________________
भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com

On Wed, Mar 15, 2017 at 9:44 PM, THintz <tdh...@gmail.com> wrote:
I follow the github instructions tesseract-ocr/tesseract/wiki/Compiling, then opened the resulting .sln file's Configuration Manager... and created an x64 clone of Win32 platform.  Then opened every project an copied the Win32 platform settings to x64 platform while leaving the explicate x64 paths alone.  This compiled on Visual Studio 2017.

--
You received this message because you are subscribed to the Google Groups "tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-oc...@googlegroups.com.

To post to this group, send email to tesser...@googlegroups.com.
Visit this group at https://groups.google.com/group/tesseract-ocr.

THintz

unread,
Mar 16, 2017, 11:46:46 AM3/16/17
to tesseract-ocr, egor....@gmail.com
Thank you so much for the additional steps!

When I ran the cppan --generate . step it told me there were no files.  I followed steps precisely because I don't know the backstory.  When I performed a cd .. before the generate step it first gave me errors updating the CMake files.  Rerunning it a second time produced no errors, but no sln was added or updated.  I was running against the repository that I had created for Win32, so maybe I have a dirty environment.  I'm retrying with a clean repository.

I'll post my experience shortly.

THintz

unread,
Mar 16, 2017, 12:30:30 PM3/16/17
to tesseract-ocr, egor....@gmail.com
Here are the steps I followed

cd \petri
mkdir Win32
cd Win32
cd tesseract
cppan  (I assume this wasn't necessary, but I'm trying to avoid improvising)
mkdir Win32 && cd Win32
cppan ..
cmake .. -G Visual Studio 14 2015 Win64

 edit cppan.yml and uncomment this line:

#generator: Visual Studio 14 2015 Win64 -> generator: Visual Studio 14 2015 Win64

cppan -- generate .

This results in the following:

D:\Petri\Win64\tesseract\Win64>cppan --generate .

no files found

So here is me improvising:

cd ..

cppan --generate .

This created an SLN in C:\Users\<user>\.cppan\storage\tmp\build\7a6e40d4\d546a32f\build

I opened it in Visual Studio 2015 and selected the Release configuration.  It builds.

THintz

unread,
Mar 16, 2017, 3:12:07 PM3/16/17
to tesseract-ocr, egor....@gmail.com
Update...
 
The reason the steps didn't work was because the -G option needs to be quoted.  This is the correct procedure for VS2017:
 
cd \petri
mkdir Win32
cd Win32
cd tesseract
cppan  (I assume this wasn't necessary, but I'm trying to avoid improvising)
mkdir Win32 && cd Win32
cppan ..
cmake .. -G "Visual Studio 15 2017 Win64"

 edit cppan.yml and uncomment, and edit, this line:

#generator: Visual Studio 14 2015 Win64 -> generator: Visual Studio 15 2017 Win64

cppan --generate .

Open the tesseract.sln created in this same folder using Visual Studio 2017, select the Release configuration and then build.

THintz

unread,
Mar 16, 2017, 3:15:45 PM3/16/17
to tesseract-ocr, egor....@gmail.com
I transcribed the commands incorrectly.  See update below.  Apologies for all the updates.


On Thursday, March 16, 2017 at 3:12:07 PM UTC-4, THintz wrote:
Update...
 
The reason the steps didn't work was because the -G option needs to be quoted.  This is the correct procedure for VS2017:
 
cd \petri
mkdir Win64
cd Win64
cd tesseract
cppan  (I assume this wasn't necessary, but I'm trying to avoid improvising)
mkdir Win64 && cd Win64

THintz

unread,
Mar 25, 2017, 4:42:34 PM3/25/17
to tesseract-ocr, egor....@gmail.com

ShreeDevi Kumar

unread,
Mar 26, 2017, 12:02:41 AM3/26/17
to tesser...@googlegroups.com

@THintz, please fix your readme file,

>cd \petri mkdir Win64 cd Win64 git clone https://github.com/tesseract-ocr/tesseract tesseract cd tesseract cppan (I assume this wasn't necessary, but I'm trying to avoid improvising) mkdir Win64 && cd Win64 cppan .. cmake .. -G "Visual Studio 15 2017 Win64"

needs to be split across lines.

Thanks!

ShreeDevi
____________________________________________________________
भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com

On Sun, Mar 26, 2017 at 2:12 AM, THintz <tdh...@gmail.com> wrote:

--
You received this message because you are subscribed to the Google Groups "tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-ocr+unsubscribe@googlegroups.com.
To post to this group, send email to tesser...@googlegroups.com.
Visit this group at https://groups.google.com/group/tesseract-ocr.

Egor Pugin

unread,
Mar 26, 2017, 9:03:18 AM3/26/17
to tesseract-ocr
@THintz,

Is it linked statically with all image libs? 
Why leptonica is not linked into dll too?

On Sunday, March 26, 2017 at 7:02:41 AM UTC+3, shree wrote:

@THintz, please fix your readme file,

>cd \petri mkdir Win64 cd Win64 git clone https://github.com/tesseract-ocr/tesseract tesseract cd tesseract cppan (I assume this wasn't necessary, but I'm trying to avoid improvising) mkdir Win64 && cd Win64 cppan .. cmake .. -G "Visual Studio 15 2017 Win64"

needs to be split across lines.

Thanks!

ShreeDevi
____________________________________________________________
भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com

On Sun, Mar 26, 2017 at 2:12 AM, THintz <tdh...@gmail.com> wrote:

--
You received this message because you are subscribed to the Google Groups "tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-oc...@googlegroups.com.

THintz

unread,
Mar 26, 2017, 9:23:46 AM3/26/17
to tesseract-ocr
I use it with Charles Weld's .net wrapper.  That wrapper expects the two libraries to be seperate DLLs.
Reply all
Reply to author
Forward
0 new messages