jacklicn / tesseract-ocr

Automatically exported from code.google.com/p/tesseract-ocr
Other
0 stars 0 forks source link

tesseract2.03 : viewer doesn't compile on Fedora 9 #169

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. './configure' ok. 'make' hang on viewer sub-folder with this error :

g++ -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -c scrollview.cpp scrollview.cpp:
In member function ‘SVEvent SVEvent::copy()’: scrollview.cpp:62: erreur:
‘strlen’ was not declared in this scope scrollview.cpp:63: erreur:
‘strncpy’ was not declared in this scope scrollview.cpp: In static member
function ‘static void ScrollView?::MessageReceiver?(void)’:
scrollview.cpp:89: erreur: ‘strlen’ was not declared in this scope
scrollview.cpp:107: erreur: ‘strncpy’ was not declared in this scope
scrollview.cpp: In static member function ‘static void
ScrollView?::StartEventHandler?(void)’: scrollview.cpp:302: erreur:
‘INT_MAX’ was not declared in this scope scrollview.cpp: In member function
‘char ScrollView?::ShowInputDialog?(const char)’: scrollview.cpp:689:
erreur: ‘strlen’ was not declared in this scope scrollview.cpp:690: erreur:
‘strncpy’ was not declared in this scope scrollview.cpp: In member function
‘char ScrollView?::AddEscapeChars?(const char)’: scrollview.cpp:795:
erreur: ‘strchr’ was not declared in this scope scrollview.cpp:800: erreur:
‘strncpy’ was not declared in this scope scrollview.cpp:807: erreur:
‘strlen’ was not declared in this scope scrollview.cpp:807: erreur:
‘strncpy’ was not declared in this scope make3?:  [scrollview.o] Erreur 1 

Workaround :
I manually added these includes :
svutil.cpp : #include "string.h" #include <stdlib.h>
svutil.h : #include "string.h"
svmnode.h : #include "string.h"
scrollview.cpp : #include "string.h"
                 also : in void* ScrollView::StartEventHandler(void* a)
 I had to replace INT_MAX by a fixed random value as the compiler says it's
never declared. I randomly put 10 as I can't figure out what is it and I
just wanted it to compile.

Please can you provide a clean fix ?

Will it be possible to have the java part working ? I put some jars in it
as it seems to be expected (piccolo, piccolox, luajava) but it doesn't work
(I bet luajava.jar hasn't been generated well).

Original issue reported on code.google.com by bessa...@gmail.com on 16 Nov 2008 at 10:19

GoogleCodeExporter commented 9 years ago
rather add #include <climits> than replacing INT_MAX. Hum ! not familiar with 
cpp.

Original comment by bessa...@gmail.com on 16 Nov 2008 at 7:10

GoogleCodeExporter commented 9 years ago
Same kind of problems with Mandriva 2009. It finally compiled but I had to 
modify the
#include <...> in

viewer/scrollview.cpp
viewer/svmnode.h
viewer/svutil.cpp

Original comment by peter...@gmail.com on 29 Nov 2008 at 9:35

GoogleCodeExporter commented 9 years ago

Original comment by theraysm...@gmail.com on 24 Dec 2008 at 12:53