gxrxrdx / tesseract-ocr

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

Linux FC11 - snprintf was not declared in this scope #225

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
[root@tbshs2 libgraphics]# uname -a
===================================
Linux tbshs2.uk 2.6.29.6-213.fc11.i686.PAE #1 SMP Tue Jul 7 20:59:29 EDT 
2009 i686 i686 i386 GNU/Linux

[root@tbshs2 libgraphics]# gcc -v
=================================
Using built-in specs.
Target: i586-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --
infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla -
-enable-bootstrap --enable-shared --enable-threads=posix --enable-
checking=release --with-system-zlib --enable-__cxa_atexit --disable-
libunwind-exceptions --enable-languages=c,c++,objc,obj-
c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin -
-with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-
multifile --enable-java-maintainer-mode --with-ecj-
jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl -
-with-cloog --with-tune=generic --with-arch=i586 --build=i586-redhat-linux
Thread model: posix
gcc version 4.4.0 20090506 (Red Hat 4.4.0-4) (GCC) 

Last Part Of Make
=================
make[3]: Leaving directory `/tmp/tempcopy/tesseract-2.04/textord'
make[2]: Leaving directory `/tmp/tempcopy/tesseract-2.04/textord'
make[1]: Leaving directory `/tmp/tempcopy/tesseract-2.04/textord'
Making install in viewer
make[1]: Entering directory `/tmp/tempcopy/tesseract-2.04/viewer'
make[2]: Entering directory `/tmp/tempcopy/tesseract-2.04/viewer'
g++ -DHAVE_CONFIG_H -I. -I..     -g -O2 -MT svutil.o -MD -MP -
MF .deps/svutil.Tpo -c -o svutil.o svutil.cpp
svutil.cpp: In constructor 'SVNetwork::SVNetwork(const char*, int)':
svutil.cpp:323: error: 'snprintf' was not declared in this scope
make[2]: *** [svutil.o] Error 1
make[2]: Leaving directory `/tmp/tempcopy/tesseract-2.04/viewer'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/tmp/tempcopy/tesseract-2.04/viewer'
make: *** [install-recursive] Error 1

Original issue reported on code.google.com by ajos1...@gmail.com on 29 Jul 2009 at 2:15

GoogleCodeExporter commented 9 years ago
Adding #include <stdio.h> to the include files will solve this on Linux but I 
don't
know if that is the desired patch.

svutil.cpp
...
#ifdef WIN32
#include <windows.h>
#include <winsock.h>
#else
#include <arpa/inet.h>
#include <netinet/in.h>
#include <pthread.h>
#include <semaphore.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <netdb.h>
#include <sys/socket.h>
#ifdef __linux__
#include <sys/prctl.h>
#endif
#endif

Original comment by richard....@cybox.com on 20 Aug 2009 at 9:50

GoogleCodeExporter commented 9 years ago
Fixed in 3.00 in svn.

Original comment by theraysm...@gmail.com on 20 Aug 2009 at 10:44

GoogleCodeExporter commented 9 years ago
Well that was very simple...

Thanks a lot!

Original comment by ajos1...@gmail.com on 21 Aug 2009 at 9:52

GoogleCodeExporter commented 9 years ago
Hi, I am having the same problem.
Please let me know how to fix this.
Thanks,

g++ -DHAVE_CONFIG_H -I. -I..   -I/usr/local/include/liblept  -g -O2 -MT 
svutil.o -MD
-MP -MF .deps/svutil.Tpo -c -o svutil.o svutil.cpp
svutil.cpp: In constructor ‘SVNetwork::SVNetwork(const char*, int)’:
svutil.cpp:323: error: ‘snprintf’ was not declared in this scope

Original comment by ricko...@gmail.com on 5 Sep 2009 at 3:28

GoogleCodeExporter commented 9 years ago
As Mr Richard hinted...

edit  "viewer/svutil.cpp"

And... add in the line below at about line 35:

#include <stdio.h>

Original comment by ajos1...@gmail.com on 6 Sep 2009 at 2:55

GoogleCodeExporter commented 9 years ago
Thanks so much.
I do appreciate it.

Original comment by ricko...@gmail.com on 6 Sep 2009 at 1:32

GoogleCodeExporter commented 9 years ago
Why is this issue not fixed in 2.04 release?

Original comment by oca...@gmail.com on 28 Jan 2010 at 10:53

GoogleCodeExporter commented 9 years ago
I just ran into this issue too. It still exists in the featured download. SVN 
trunk
checkout wouldn't compile at all (complaining about ..\config missing).

Original comment by r.sch...@gmail.com on 12 May 2010 at 5:16