Thanks. 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]<javascript:> > > wrote: > >> 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? >
I think it is an easy and feasible way, although sounds awkward. > Google, found 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 > Then what should I use? I am in Ubuntu. The available and popular C++ IDE is Eclipse. And since I want to go to the dubugging mode for tesseractmain.cpp (I want to look into the ocr code), it is better to use a IDE. It would be appreciated if you advice more easier options. I did not copy the missing library. The librt is in the computer. I just include the library path and file in the project properties. But it still complains, so I think I need to find and include the corresponding header. What is the header file for librt? Thanks. -- 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

