kcobra / tesseract-ocr

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

Building failed: math.h: expf() and powf() #407

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I am tring to build tesseract-ocr on Visual C++ 2005, but failed during 
compiling stage. The issue seems at math.h: expf() and powf(). The build log is 
below:

d:\program files\microsoft visual studio 8\vc\include\math.h(402) : error 
C2062: type 'float' unexpected
d:\program files\microsoft visual studio 8\vc\include\math.h(403) : error 
C2143: syntax error : missing ';' before '{'
d:\program files\microsoft visual studio 8\vc\include\math.h(403) : error 
C2447: '{' : missing function header (old-style formal list?)
d:\program files\microsoft visual studio 8\vc\include\math.h(416) : error 
C2062: type 'float' unexpected
d:\program files\microsoft visual studio 8\vc\include\math.h(417) : error 
C2143: syntax error : missing ';' before '{'
d:\program files\microsoft visual studio 8\vc\include\math.h(417) : error 
C2447: '{' : missing function header (old-style formal list?)

Can anyone help me for this issue?

Thanks

Cai Jing

What steps will reproduce the problem?
1. Re-build on Visual C++ 2005, but failed...
2.
3.

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

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by jcai2...@gmail.com on 29 Nov 2010 at 10:23

GoogleCodeExporter commented 9 years ago
Visual C++ 2005 is not supported in new version of tesseract-ocr (see 
http://code.google.com/p/tesseract-ocr/#Supported_Platforms, or 
http://code.google.com/p/tesseract-ocr/wiki/ReadMe#Windows regarding older 
versions).

Original comment by zde...@gmail.com on 29 Nov 2010 at 1:56

GoogleCodeExporter commented 9 years ago
d:\program files\microsoft visual studio 8\vc\include\math.h(402) : error 
C2062: type 'float' unexpected

Original comment by vibhutik...@gmail.com on 15 Jan 2011 at 3:54

GoogleCodeExporter commented 9 years ago
First of all: this issue has lack of basic information: what version/revision 
of tesseract you tried to compile, what version of windows you use...

Next: I use Microsoft Visual C++ 2008 Express Edition and the math.h is located 
in "c:\Program Files\Microsoft Visual Studio 9.0\VC\include\math.h". So it 
looks like you used unsupported compiler.

Original comment by zde...@gmail.com on 15 Jan 2011 at 7:58

GoogleCodeExporter commented 9 years ago
Although VS2005 is not supported. Anyone searching a solution can fix it by 
changing the '1400' in "environ.h" to 1200 (with is actually VC++6) :

/* VC++6 doesn't seem to have powf, expf. */
#if (_MSC_VER <= 1400)
...
#endif

Original comment by mark.ple...@gmail.com on 29 Sep 2011 at 9:02