sonurakpinar / tesseract-ocr

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

[PATCH] Building SVN checkout fails with GCC. #1061

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Checkout current svn (r974)
2. Build with GCC (4.8.1) (or any other non MSVC compiler)

What is the expected output? What do you see instead?

Build error

libtool: compile:  g++ -std=c++11 -DHAVE_CONFIG_H -I. -I../../textord -I.. -O2 
-DNDEBUG -DUSE_STD_NAMESPACE -I../../ccstruct -I../../ccutil -I../../viewer 
-I../../ccmain -I../../wordrec -I../../api -I../../cutil -I../../classify 
-I../../dict -I../../opencl -I/usr/include/leptonica -pthread 
-I/usr/include/pango-1.0 -I/usr/include/glib-2.0 
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/cairo 
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include 
-I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 
-std=c++11 -MT alignedblob.lo -MD -MP -MF .deps/alignedblob.Tpo -c 
../../textord/alignedblob.cpp  -fPIC -DPIC -o .libs/alignedblob.o
In file included from ../../textord/alignedblob.h:24:0,
                 from ../../textord/alignedblob.cpp:20:
../../textord/bbgrid.h:367:3: error: 'unordered_set' does not name a type
   unordered_set<BBC*, PtrHash<BBC> > returns_;
   ^
../../textord/bbgrid.h: In member function 'BBC* tesseract::GridSearch<BBC, 
BBC_CLIST, BBC_C_IT>::NextRadSearch()':
../../textord/bbgrid.h:740:28: error: 'returns_' was not declared in this scope
   } while (unique_mode_ && returns_.find(previous_return_) != returns_.end());
                            ^
../../textord/bbgrid.h: In member function 'BBC* tesseract::GridSearch<BBC, 
BBC_CLIST, BBC_C_IT>::NextSideSearch(bool)':
../../textord/bbgrid.h:782:28: error: 'returns_' was not declared in this scope
   } while (unique_mode_ && returns_.find(previous_return_) != returns_.end());
                            ^
../../textord/bbgrid.h: In member function 'BBC* tesseract::GridSearch<BBC, 
BBC_CLIST, BBC_C_IT>::NextVerticalSearch(bool)':
../../textord/bbgrid.h:824:28: error: 'returns_' was not declared in this scope
   } while (unique_mode_ && returns_.find(previous_return_) != returns_.end());
                            ^
../../textord/bbgrid.h: In member function 'BBC* tesseract::GridSearch<BBC, 
BBC_CLIST, BBC_C_IT>::NextRectSearch()':
../../textord/bbgrid.h:859:29: error: 'returns_' was not declared in this scope
            (unique_mode_ && returns_.find(previous_return_) != returns_.end()));
                             ^
../../textord/bbgrid.h: In member function 'void tesseract::GridSearch<BBC, 
BBC_CLIST, BBC_C_IT>::RepositionIterator()':
../../textord/bbgrid.h:898:3: error: 'returns_' was not declared in this scope
   returns_.clear();
   ^
../../textord/bbgrid.h: In member function 'void tesseract::GridSearch<BBC, 
BBC_CLIST, BBC_C_IT>::CommonStart(int, int)':
../../textord/bbgrid.h:931:3: error: 'returns_' was not declared in this scope
   returns_.clear();
   ^

The error was introduced by r898 zdenop@gmail.com ("fix VC++ build" ... by 
breaking non-VC++ builds ...).  The attached patch should fix it.

Original issue reported on code.google.com by ruedi...@c-plusplus.de on 10 Jan 2014 at 4:45

Attachments:

GoogleCodeExporter commented 9 years ago
Linux build (gcc) should be fixed in r979.
svn r898 modified bbgrid.h and recent error was in hashfn.h. And the respective 
code in r898 bbgrid.h and r974 hashfn.h is different.
You can easily check that linux build works ok with r898 or r900 ;-)

Original comment by zde...@gmail.com on 11 Jan 2014 at 12:13