Dňa 24.05.2010 20:26, Jimmy O'Regan wrote / napísal(a): > 2010/5/24 Zdenko Podobný <zde...@gmail.com>: > >> Dňa 24.05.2010 19:46, Jimmy O'Regan wrote / napísal(a): >> >>> On 24 May 2010 17:41, Lars Aronsson <l...@aronsson.se> wrote: >>> >>> >>>> Peter Alberti wrote: >>>> >>>> >>>>>>> I've trained tesseract r319 (3.0) to support Danish texts written in >>>>>>> fraktur. It is not >>>>>>> perfect but good enough that I hope it may be useful to others. >>>>>>> >>>>>>> >>>> Jimmy O'Regan wrote: >>>> >>>> >>>>> With the current SVN version, you can use combine_tessdata -e >>>>> [trainingdata file] [files to extract] to extract the components you >>>>> want, and combine_tessdata [path to files] to make a new trainingdata >>>>> file. >>>>> >>>>> >>>> I tried to compile the current version (svn -r354 up), but failed: >>>> >>>> svshowim.cpp: In function ‘void sv_show_sub_image(IMAGE*, inT32, inT32, >>>> inT32, inT32, ScrollView*, inT32, inT32)’: >>>> svshowim.cpp:37: error: no matching function for call to >>>> ‘ScrollView::Image(Pix*&, inT32&, int)’ >>>> ../viewer/scrollview.h:266: note: candidates are: void >>>> ScrollView::Image(const char*, int, int) >>>> >>>> Versions 340, 351, 352, 353 also failed in the same place. >>>> >>>> >>>> >>> Looks like a pair of missing casts - have you opened an issue? >>> >>> >> I did: http://code.google.com/p/tesseract-ocr/issues/detail?id=303 >> >> > Weird. It's there: > 337 theraysmith #ifdef HAVE_LIBLEPT > 149 theraysmith // Draw a Pix on (x,y). > 149 theraysmith void Image(struct Pix* image, int x_pos, int y_pos); > 337 theraysmith #endif > > The only thing I can think of is that you might need to make clean > before running make. > > > I deleted whole tesseract directory and I downloaded fresh svn copy () Than I run ./runautoconf; ./configure; make and I got the same result...
So I deleted lines 204 and 207 (#ifdef HAVE_LIBLEPT , #endif ) from viewer/scrollview.h than compilation continued up to this error: g++ -DHAVE_CONFIG_H -I. -I.. -I../ccutil -I../ccstruct -I../image -I../viewer -I../ccops -I../dict -I../classify -I../ccmain -I../wordrec -I../cutil -I../textord -I/usr/local/include/liblept -g -O2 -MT tesseractmain.o -MD -MP -MF .deps/tesseractmain.Tpo -c -o tesseractmain.o tesseractmain.cpp tesseractmain.cpp: In function ‘int main(int, char**)’: tesseractmain.cpp:227: error: ‘pix’ was not declared in this scope So I put declaration to line 225 in api/tesseractmain.cpp: PIX *pix; Than compilation continue but soon it fails on with this message: g++ -g -O2 -o tesseract tesseractmain.o libtesseract_api.a -llept -ltiff -lpthread -ljpeg -lpng -lz -lm libtesseract_api.a(libtesseract_api.o): In function `sv_show_sub_image(IMAGE*, int, int, int, int, ScrollView*, int, int)': /usr/src/tesseract-ocr-r354/image/svshowim.cpp:37: undefined reference to `ScrollView::Image(Pix*, int, int)' collect2: ld returned 1 exit status make[3]: *** [tesseract] Error 1 I am not able to solve this. It looks to me like problem with leptonlib (I have leptonlib-1.65) - all problems where between #ifdef HAVE_LIBLEPT , #endif. But I was able to build r326 without problem with leptonlib-1.65. Zd.
smime.p7s
Description: S/MIME Cryptographic Signature