If i change some code lines in tesseract, what is the way to compile and have tesseract work with that new code?

64 views
Skip to first unread message

Merve Temizer

unread,
May 21, 2014, 6:42:14 AM5/21/14
to tesser...@googlegroups.com
Hello,

I remember i did this a couple of years ago,

i remember i write some command line like

-LsomeLibrary -Lsomethingelse 

i do not know what is the command gcc, or something else, maybe.

THanks for any idea

Nick White

unread,
May 21, 2014, 11:44:59 AM5/21/14
to tesser...@googlegroups.com
Hi Merve.

Tesseract uses autotools to manage its compilation. Instructions for
it are here: https://code.google.com/p/tesseract-ocr/wiki/Compiling

Beware though that if you couldn't figure this out, and have not
compiled code for years, you may find Tesseract's code a bit of a
challenge ;)

Good luck!

Nick

Merve Temizer

unread,
May 23, 2014, 4:04:46 AM5/23/14
to tesser...@googlegroups.com
Hi,

I learned a bit about how can i tell what i have to do.

Before what i have to do; i must tell i have achieved to compile tesseract from source, and run some standard test on that installation.

I have noticed that i do NOT need exactly modify tesseract, instead, i must write some line of code that uses tesseract APIs and compile that code and run it.

I remeber as i wrote in previous mail i was compiling this kind of code with sth like

g++ -LsomeLibrary -Lsomethingelse -I lotsofthiskindofneeding

Could i tell what i have to do? 

21 Mayıs 2014 Çarşamba 18:44:59 UTC+3 tarihinde Nick White yazdı:

zdenop

unread,
May 23, 2014, 8:36:43 AM5/23/14
to tesser...@googlegroups.com


On Friday, 23 May 2014 10:04:46 UTC+2, Merve Temizer wrote:
Hi,

I learned a bit about how can i tell what i have to do.

Before what i have to do; i must tell i have achieved to compile tesseract from source, and run some standard test on that installation.

I have noticed that i do NOT need exactly modify tesseract, instead, i must write some line of code that uses tesseract APIs and compile that code and run it.

I remeber as i wrote in previous mail i was compiling this kind of code with sth like

g++ -LsomeLibrary -Lsomethingelse -I lotsofthiskindofneeding 

Could i tell what i have to do? 

This was changed with implementation of autotools. Now it you need to use:

g++ -ltesseract ...

and if you use also some leptonica function in your code (which could be expected) add also -llept

Have a look at example in http://pastebin.com/0dV84hBa were is also compile command

Nick White

unread,
May 23, 2014, 11:31:53 AM5/23/14
to tesser...@googlegroups.com
On Fri, May 23, 2014 at 05:36:43AM -0700, zdenop wrote:
> This was changed with implementation of autotools. Now it you need to use:
>
> g++ -ltesseract ...
>
> and if you use also some leptonica function in your code (which could be
> expected) add also -llept

Yes, it's completely standard. The library is called 'tesseract, so
you use -ltesseract. If the library is installed in a nonstandard
location, you need -L/path/to/tesseract-lib, and if the includes are
in a nonstandard location, you'll need -I/path/to/tesseract-includes

Nick
Reply all
Reply to author
Forward
0 new messages