Hi Lakshmesha

I got the latest iulib and was able to get this to work. But Makefile
needs a change for swig to work on ocropus.i.

The line is
swig -python -c++ ocropus.i

Whereas it should be
swig -I/usr/local/include -python -c++ ocropus.i

Also, once I got the make done. I am guessing I need to call ld ( GNU
Linker)

So I tried the following ( 
http://www.dabeaz.com/cgi-bin/wiki.pl?SwigFaqLinuxSharedLibraries
)

  ld -shared _iulib.so -o iulib.so

It goes through fine ( Shouldn't I be needing sudo privileges ?)

But when I run test2.py I am getting the following error. I need to do
the same for

Traceback (most recent call last):
  File "test2.py", line 1, in <module>
    import iulib,numpy,pylab
ImportError: _iulib.so: cannot open shared object file: No such file
or directory


What am I doing wrong ?

thanks



On Jun 19, 12:38 pm, lakshmesha G V <[email protected]> wrote:
> Hi Vidyanand,
>  Sorry download iulib from the mercurial 
> repositoryhttps://iulib.googlecode.com/hg/.
> You can find the instruction in the 
> sitehttp://code.google.com/p/iulib/source/checkout.
>
> These things are neccesary for ocroswig since while developing ocroswig,
> some fixes were added to iulib.
> So you have to use the latest iulib version. No changes were made to ocropus
> however.
>
> Regards,
> Lakshmesha
>
>
>
> On Thu, Jun 18, 2009 at 9:31 PM, vidyanand <[email protected]> wrote:
>
> > Hi Lakshmesha
>
> > I downloaded the same ( iulib-0.4 ) and installed it using scons and
> > tried doing a make on ocroswig.
>
> > I still get the same error.
>
> > On Jun 18, 9:13 pm, lakshmesha G V <[email protected]> wrote:
> > > Hi Vidyanand,
> > >  You need to use the latest iulib for it. You can download it from the
> > link
> > > in sitehttp://code.google.com/p/iulib/downloads/list
> > > Use it and give it a try.
>
> > > Regards,
> > > Lakshmesha
>
> > > On Thu, Jun 18, 2009 at 4:48 PM, vidyanand <[email protected]> wrote:
>
> > > > Hi Thomas
>
> > > > I have ocropus 0.4 ( install from the tar file in downloads sections)
> > > > installed. I downloaded the latest version of ocroswig and am trying
> > > > to run make on it, but it fails with the following error.
>
> > > > /usr/local/include/colib/narray-util.h: In function ‘void
> > > > colib::clampscale(colib::narray<T>&, colib::narray<S>&, T, T) [with T
> > > > = float, U = float]’:
> > > > iulib_wrap.cxx:21719:   instantiated from here
> > > > /usr/local/include/colib/narray-util.h:432: error: no matching
> > > > function for call to ‘colib::narray<float>::at1d()’
> > > > /usr/local/include/colib/narray.h:432: note: candidates are: T&
> > > > colib::narray<T>::at1d(int) const [with T = float]
> > > > /usr/local/include/colib/narray-util.h: In function ‘void
> > > > colib::clampscale(colib::narray<T>&, colib::narray<S>&, T, T) [with T
> > > > = int, U = int]’:
> > > > iulib_wrap.cxx:21785:   instantiated from here
> > > > /usr/local/include/colib/narray-util.h:432: error: no matching
> > > > function for call to ‘colib::narray<int>::at1d()’
> > > > /usr/local/include/colib/narray.h:432: note: candidates are: T&
> > > > colib::narray<T>::at1d(int) const [with T = int]
> > > > /usr/local/include/colib/narray-util.h: In function ‘void
> > > > colib::clampscale(colib::narray<T>&, colib::narray<S>&, T, T) [with T
> > > > = unsigned char, U = unsigned char]’:
> > > > iulib_wrap.cxx:21851:   instantiated from here
> > > > /usr/local/include/colib/narray-util.h:432: error: no matching
> > > > function for call to ‘colib::narray<unsigned char>::at1d()’
> > > > /usr/local/include/colib/narray.h:432: note: candidates are: T&
> > > > colib::narray<T>::at1d(int) const [with T = unsigned char]
> > > > make: *** [_iulib.so] Error 1
>
> > > > I am guessing the interface file is not compatible anymore with that
> > > > version. What do you suggest ?
>
> > > > I am new to the SWIG world, but I could help out if you give me some
> > > > pointers to get this to work.
>
> > > > thanks
> > > > Vidyanand
>
> > > > On May 3, 5:30 am, Thomas Breuel <[email protected]> wrote:
> > > > > I put up the very beginnings of SWIG support in a new sub-project at
> > > > > mercurial.iupr.org (ocroswig).
>
> > > > > If you're brave enough to compile and install the mercurial version
> > of
> > > > > OCRopus, you can give it a try.
>
> > > > > It actually can already do useful things: you can read/write images,
> > > > convert
> > > > > them to/from Python images or arrays, and you can invoke any of the
> > major
> > > > > components of OCRopus from it, including layout analysis and text
> > line
> > > > > recognition.  There is no documentation, though.
>
> > > > > Tom
>
> > > --
> > > -Lakshmesha
>
> --
> -Lakshmesha
--~--~---------~--~----~------------~-------~--~----~
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