ai-karanam / leptonica

Automatically exported from code.google.com/p/leptonica
0 stars 0 forks source link

xtractprotos.c doesn't compile on Windows #31

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to compile xtractprotos.c.

What is the expected output? What do you see instead?
I expect to compile xtractprotos.c.

What version of the product are you using? On what operating system?
leptonlib-1.64
Microsoft Visual Studio 2008 SP1 with latest updates also applied.
Windows XP Pro SP3.

Please provide any additional information below.
VC++ doesn't like the following:

  char buf[L_BUF_SIZE];

You'll have to change L_BUF_SIZE to the following like other places in
leptonica:

 #define L_BUF_SIZE 512

In VC++'s defense, it claims that C is more restrictive than C++. It
purposely disallows this in c files. It CAN handle array initialization
with static consts in C++ files. See
http://msdn.microsoft.com/en-us/library/eff825eh.aspx for details.

Original issue reported on code.google.com by tomp2...@gmail.com on 15 Jan 2010 at 7:43

GoogleCodeExporter commented 9 years ago
Thanks for the bug and the fix.
Will be fixed in 1.65.

Original comment by dan.bloo...@gmail.com on 18 Jan 2010 at 1:44

GoogleCodeExporter commented 9 years ago
Fixed.  Forgot to add "in C" to my comment, but the compiler ignores that 
anyway ...

Original comment by dan.bloo...@gmail.com on 8 Apr 2010 at 6:08