gcc 4.3 now has strict(er) rules requiring imports to be declared.

I found the following changes allowed it to build.

the errors vary
=== errors ===
make[3]: Entering directory `/home/rbuckland/builds/orig/
tesseract-2.03/viewer'
g++ -DHAVE_CONFIG_H -I. -I. -I..     -g -O2 -c scrollview.cpp
scrollview.cpp: In member function ‘SVEvent* SVEvent::copy()’:
scrollview.cpp:62: error: ‘strlen’ was not declared in this scope
scrollview.cpp:63: error: ‘strncpy’ was not declared in this scope
scrollview.cpp: In static member function ‘static void*
ScrollView::MessageReceiver(void*)’:
scrollview.cpp:89: error: ‘strlen’ was not declared in this scope
scrollview.cpp:107: error: ‘strncpy’ was not declared in this scope
scrollview.cpp: In static member function ‘static void*
ScrollView::StartEventHandler(void*)’:
scrollview.cpp:302: error: ‘INT_MAX’ was not declared in this scope
scrollview.cpp: In member function ‘char*
ScrollView::ShowInputDialog(const char*)’:
scrollview.cpp:689: error: ‘strlen’ was not declared in this scope
scrollview.cpp:690: error: ‘strncpy’ was not declared in this scope
scrollview.cpp: In member function ‘char*
ScrollView::AddEscapeChars(const char*)’:
scrollview.cpp:795: error: ‘strchr’ was not declared in this scope
scrollview.cpp:800: error: ‘strncpy’ was not declared in this scope
scrollview.cpp:807: error: ‘strlen’ was not declared in this scope
scrollview.cpp:807: error: ‘strncpy’ was not declared in this scope
=== === === ===

The fix is to explicitly include the standard classes etc
--------------------------------
[EMAIL PROTECTED]:~/builds$ diff -r orig/tesseract-2.03/
tesseract-2.03/ | egrep -v "Only in"
diff -r orig/tesseract-2.03/viewer/scrollview.cpp tesseract-2.03/
viewer/scrollview.cpp
37c37,38
< #include <string>
---
> #include <climits>
> #include <cstring>
diff -r orig/tesseract-2.03/viewer/svmnode.cpp tesseract-2.03/viewer/
svmnode.cpp
29a30
> #include <cstring>
diff -r orig/tesseract-2.03/viewer/svutil.cpp tesseract-2.03/viewer/
svutil.cpp
29a30,31
> #include <cstring>
> #include <cstdlib>
-----------------------------------
--~--~---------~--~----~------------~-------~--~----~
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