It looks like cygwin bug[1]. Can you please in file ccutil/ambigs.cpp replace line 23 (#include <stdio.h>) with line: #include <cstdio>
Than try to compile tesseract if it helps. [1] http://stackoverflow.com/questions/20149633/how-to-use-snprintf-in-g-std-c11-version-4-8-2 Zdenko Zdenko On Tue, Mar 4, 2014 at 7:14 PM, Bernard Polarski <[email protected]> wrote: > Here is the effect if I leave CXXFLAGS= "-std=c++11:" > In attach the config.log. > > Note that this is a cygwin install from scratch and the issue occurred on > 2 different machines. > > Here is the effect if I leave CXXFLAGS= "-std=c++11:" > In attach the config.log. > > Note that this is a cygwin install from scratch and the issue occurred on > 2 different machines. > > > . > > . > > Configuration is done. > > You can now build and install tesseract by running: > > > $ make > > $ sudo make install > > $ sudo make install LANGS="eng ara deu" > > Or: > > $ sudo make install-langs > > > Training tools can be build and installed (after building of tesseract) > with: > > > $ make training > > $ sudo make training-install > > > [/src/tesseract-3.03]> make > > make all-recursive > > make[1]: Entering directory '/src/tesseract-3.03' > > Making all in ccutil > > make[2]: Entering directory '/src/tesseract-3.03/ccutil' > > make[3]: Entering directory '/src/tesseract-3.03/ccutil' > > /bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. > -O2 -DNDEBUG -I/usr/local/include/leptonica -D_REENTRANT > -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 > -I/usr/lib/glib-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 > -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 > -I/usr/include/freetype2 -I/usr/include/libpng15 > -DTESSDATA_PREFIX=/usr/local/share/ -std=c++11 -MT ambigs.lo -MD -MP -MF > .deps/ambigs.Tpo -c -o ambigs.lo ambigs.cpp > > libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -O2 -DNDEBUG > -I/usr/local/include/leptonica -D_REENTRANT -I/usr/include/pango-1.0 > -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/cairo > -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 > -I/usr/include/freetype2 -I/usr/include/libpng15 > -DTESSDATA_PREFIX=/usr/local/share/ -std=c++11 -MT ambigs.lo -MD -MP -MF > .deps/ambigs.Tpo -c ambigs.cpp -DDLL_EXPORT -DPIC -o .libs/ambigs.o > > ambigs.cpp: In member function 'bool > tesseract::UnicharAmbigs::ParseAmbiguityLine(int, int, int, const > UNICHARSET&, char*, int*, UNICHAR_ID*, int*, char*, int*)': > > ambigs.cpp:267:79: error: 'snprintf' was not declared in this scope > > snprintf(replacement_string, kMaxAmbigStringSize, "%s", > fields[1].string()); > > > ^ > > ambigs.cpp:273:63: error: 'strtok_r' was not declared in this scope > > if (!(token = strtok_r(buffer, kAmbigDelimiters, &next_token)) || > > ^ > > ambigs.cpp:285:63: error: 'strtok_r' was not declared in this scope > > if (!(token = strtok_r(NULL, kAmbigDelimiters, &next_token))) break; > > ^ > > ambigs.cpp:295:61: error: 'strtok_r' was not declared in this scope > > !(token = strtok_r(NULL, kAmbigDelimiters, &next_token)) || > > ^ > > ambigs.cpp:308:63: error: 'strtok_r' was not declared in this scope > > if (!(token = strtok_r(NULL, kAmbigDelimiters, &next_token))) break; > > ^ > > ambigs.cpp:329:63: error: 'strtok_r' was not declared in this scope > > if (!(token = strtok_r(NULL, kAmbigDelimiters, &next_token)) || > > ^ > > Makefile:477: recipe for target 'ambigs.lo' failed > > make[3]: *** [ambigs.lo] Error 1 > > make[3]: Leaving directory '/src/tesseract-3.03/ccutil' > > Makefile:524: recipe for target 'all-recursive' failed > > make[2]: *** [all-recursive] Error 1 > > make[2]: Leaving directory '/src/tesseract-3.03/ccutil' > > Makefile:396: recipe for target 'all-recursive' failed > > make[1]: *** [all-recursive] Error 1 > > make[1]: Leaving directory '/src/tesseract-3.03' > > Makefile:304: recipe for target 'all' failed > > make: *** [all] Error 2 > > [/src/tesseract-3.03]> > > > > > Le mardi 4 mars 2014 12:44:37 UTC+1, zdenop a écrit : > - afficher le texte des messages précédents - > > Le mardi 4 mars 2014 12:44:37 UTC+1, zdenop a écrit : > >> Version 4.8 should support it[1]. So why did you turn off c++11 >> support? What was error message/problem? >> >> >> [1] http://gcc.gnu.org/gcc-4.8/cxx0x_status.html >> >> Zdenko >> >> >> On Tue, Mar 4, 2014 at 12:34 PM, Bernard Polarski <[email protected]>wrote: >> >>> I am using gcc version 4.8.2 (GCC) >>> Le lundi 3 mars 2014 19:36:07 UTC+1, Nick White a écrit : >>> >>>> On Mon, Mar 03, 2014 at 03:21:47PM +0100, zdenko podobny wrote: >>>> > On Mon, Mar 3, 2014 at 2:53 PM, Bernard Polarski <[email protected]> >>>> wrote: >>>> > Note : I had to remove -std=c++11 from CXXFLOAGS in configure >>>> and >>>> > configure.ac. >>>> > leptonica 1.70 is easy to add ( see link mheonicka ) >>>> > >>>> > >>>> > that simply means your compiler is outdated and you can expect >>>> problem (in >>>> > future...) >>>> >>>> Bernard, are you using the latest version of Cygwin? Can you see >>>> what version of gcc/g++ is included? It's surprising to me that the >>>> version included in cygwin would be so old... >>>> >>> -- >>> -- >>> 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 >>> >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "tesseract-ocr" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >> >> -- > -- > 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 > > --- > You received this message because you are subscribed to the Google Groups > "tesseract-ocr" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- -- 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 --- You received this message because you are subscribed to the Google Groups "tesseract-ocr" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

