Ok, got it working now!

Just to let you and other ppl know, I needed two adjustments:

1) add #include "imglabels.h" to main-ocr-pageseg-xycut.cc
2) make sure /usr/local/include/ocropus/ocr-pageseg-xycut.h
    and the local copy of the same .h won't collide. for example,
    by copying the main...cc to a empty subdir and go compiling there.


Caius


On Sep 15, 1:52 pm, "Faisal Shafait" <[EMAIL PROTECTED]> wrote:
> Hi Caius,
> A couple of things:
> - do you have latest svn versions of iulib (r86) and ocropus (r1196) (svn
> info)
> - have you installed iulib and ocropus in /usr/local ? (sudo make install)
> - do you get an error like: error: ocr-utils.h: No such file or directory ?
> - try: ls /usr/local/include/ocropus/ocr-utils.h
> /usr/local/include/iulib/imglib.h /usr/local/include/iulib/imglabels.h
>   and then: grep simple_recolor /usr/local/include/iulib/imglabels.h
>
> If ls does not report "No such file or directory" or grep does not find the
> simple_recolor() method, there is some problem with your installation or svn
> version. Otherwise, it should just work.
>
> Cheers,
> Faisal
>
> On Mon, Sep 15, 2008 at 12:07 PM, Caius <[EMAIL PROTECTED]> wrote:
>
> > Hey Faisal!
>
> > I tried both of the following:
>
> > g++ main-ocr-pageseg-xycut.cc -o xycut -I/usr/local/include/colib -I/
> > usr/local/include/iulib -I/usr/local/include/ocropus* -lpng -liulib -
> > ljpeg -locropus*
>
> > and
>
> > g++ main-ocr-pageseg-xycut.cc -o xycut -I/usr/local/include/colib -I/
> > usr/local/include/iulib -I/usr/local/include/ocropus -lpng -liulib -
> > ljpeg -locropus
>
> > But my problem persists, in either case I am still getting the same
> > output:
>
> > main-ocr-pageseg-xycut.cc: In function 'void
> > invertbg(colib::intarray&)':
> > main-ocr-pageseg-xycut.cc:38: error: 'simple_recolor' was not declared
> > in this scope
> > main-ocr-pageseg-xycut.cc: In function 'int main(int, char**)':
> > main-ocr-pageseg-xycut.cc:58: error: invalid use of incomplete type
> > 'struct ocropus::SegmentPageByXYCUTS'
> > ocr-pageseg-xycut.h:40: error: forward declaration of 'struct
> > ocropus::SegmentPageByXYCUTS'
>
> > So what's I don't understand is why isn't it able to reach the
> > libraries for the simple_recolor() function for example...
> > At least the following works while not in working copy directory:
>
> > ocroscript recognize image.png
>
> > Any ideas? Anything else I could use to check if all is in place?
>
> > Caius
>
> > On Sep 15, 11:46 am, "Faisal Shafait" <[EMAIL PROTECTED]> wrote:
> > > Hi Caius,
> > > Besides, including the header files, you also need to link to the
> > libraries.
> > > Here is a command that should produce an executable named xycut:
> > > g++ main-ocr-pageseg-xycut.cc *-o xycut* -I/usr/local/include/colib
> > > -I/usr/local/include/iulib -I/usr/local/include/ocropus* -lpng -liulib
> > > -ljpeg -locropus*
>
> > > Cheers,
> > > Faisal
>
> > > On Sun, Sep 14, 2008 at 10:15 PM, Caius <[EMAIL PROTECTED]> wrote:
>
> > > > Hi list!
>
> > > > Ok, sorry for the generic parts I could go study myself, but I wasn't
> > > > sure what's really holding me back here... The problem is I can't
> > > > compile main-ocr-pageseg-xycut to see what it does.
>
> > > > I've tried this from the ocr-pageseg subdirectory:
>
> > > > g++ main-ocr-pageseg-xycut.cc -I/usr/local/include/colib -I/usr/local/
> > > > include/iulib -I/usr/local/include/ocropus
>
> > > > And it complains like this:
>
> > > > main-ocr-pageseg-xycut.cc: In function 'void
> > > > invertbg(colib::intarray&)':
> > > > main-ocr-pageseg-xycut.cc:38: error: 'simple_recolor' was not declared
> > > > in this scope
> > > > main-ocr-pageseg-xycut.cc: In function 'int main(int, char**)':
> > > > main-ocr-pageseg-xycut.cc:58: error: invalid use of incomplete type
> > > > 'struct ocropus::SegmentPageByXYCUTS'
> > > > ocr-pageseg-xycut.h:40: error: forward declaration of 'struct
> > > > ocropus::SegmentPageByXYCUTS'
>
> > > > So probably it's just how I'm trying to do the compiling.. Could
> > > > someone help a C++ newbie, please?
>
> > > > I've got ocropus r1194 from svn compiled and installed, and the "run-
> > > > tests" script finishes successfully.
>
> > > > Thanks!
> > > > Caius
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ocropus" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/ocropus?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to