On Mon, Nov 19, 2012 at 9:36 PM, Linda Li <[email protected]>wrote:

> Hah, I figured it out.
> You are right, "undefined" does not mean "undeclared". So I think I found
> a one wrong lib.
>
> I checked the Makefile, although a lot of strange words there, there are
> LIBS = -llept -lpthread
> So I include pthread in it.
> Now the tesseractmain.cpp builds. (only it, yes, I put other .cpp files
> containing main() to .txt files, wired, violent but worked : )
>
> Thanks a lot for zdenop's help.
>

Hint: look at Makefile.am - it is simplier and Makefile(.in) is generated
from it (autotools do it).

>
> On Monday, November 19, 2012 10:30:07 AM UTC-6, zdenop wrote:
>
>> On Sun, Nov 18, 2012 at 11:49 PM, Linda Li <[email protected]> wrote:
>>
>>> I build it to run tessearctmain.cpp.
>>>
>>> I do not intend to compile the whole
>>>
>>>
>>>  Thanks to instruction from Zdenko, I add the symbols as follows:
>>>
>>> In Eclipse, Project Properties->C/C++ General->Paths and Symbols
>>>
>>> Symbol, Value.
>>>
>>> USE_STD_NAMESPACE
>>>
>>> VERSION=\"3.02.02\"
>>>
>>>
>>>  Now building succeeds.
>>>
>>> Compile has errors, complaining there are several main() functions.
>>>
>>> I have little knowledge of makefile, which I guess can circumvent this
>>> problem, so I renamed all functions with main(), except tesseractmain.cpp,
>>> to .txt files.
>>>
>>
>> Are you sure you know what are you doing?
>>
>>> Now the compiling errors are:
>>>
>>> svutil.cpp:129: undefined reference to `sem_init'
>>>
>>> svutil.cpp:137: undefined reference to `sem_post'
>>>
>>> svutil.cpp:145: undefined reference to `sem_wait'
>>>
>>> svutil.cpp:188: undefined reference to `pthread_create'
>>>
>>>
>>>  I search the word “sem_init”, which is in the configure file.
>>>
>>> I do not understand the configure file.
>>>
>>> Finding some commands containing “sem_init”
>>>
>>> { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing
>>> sem_init" >&5
>>>
>>> char sem_init ();
>>>
>>> int
>>>
>>> main ()
>>>
>>> {
>>>
>>> return sem_init ();
>>>
>>> ;
>>>
>>> return 0;
>>>
>>> }
>>>
>>>
>>>  Google, found http://code.google.com/p/**tesseract-ocr/issues/detail?**
>>> id=757 <http://code.google.com/p/tesseract-ocr/issues/detail?id=757>
>>>
>>> “The build fails as sem_init is in librt on Solaris. The attached patch
>>> adds searching for sem_init in librt. After that the build succeeds.”
>>>
>>>
>>>  Search librt in the libraries:
>>>
>>> /usr/lib/x86_64-linux-gnu/
>>>
>>> librt.a
>>>
>>> librt.so
>>>
>>>
>>>  So I include /usr/lib/x86_64-linux-gnu into the Library Paths
>>>
>>> Include rt into Libraries.
>>>
>>>
>>>  Rebuild the project with hope....
>>>
>>>
>>>  Again, the same compiling errors are:
>>>
>>> svutil.cpp:129: undefined reference to `sem_init'
>>>
>>> svutil.cpp:137: undefined reference to `sem_post'
>>>
>>> svutil.cpp:145: undefined reference to `sem_wait'
>>>
>>> svutil.cpp:188: undefined reference to `pthread_create'
>>>
>>> I guess I need to include some header files. But I failed to find one.
>>>
>>> Or do I have to learn autotool to achieve what I want?
>>> An easy way?
>>>
>>
>> Hmm, why you are trying to use tesseract withing Ellipse (personally I
>> found to work with eclipse more difficult than other solutions, but it
>> could be my problem) if you have no clue about standard compiler errors
>> ;-)?
>> That error means that linker is missing library that provide sem_init,
>> sem_post, sem_wait, pthread_create on YOUR system (copying from other
>> system does not always work).
>>
>> --
>> Zdenko
>>
>  --
> You received this message because you are subscribed to the Google
> Groups "tesseract-ocr" 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/tesseract-ocr?hl=en
>



-- 
Zdenko

-- 
You received this message because you are subscribed to the Google
Groups "tesseract-ocr" 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/tesseract-ocr?hl=en

Reply via email to