xinggangw / leptonica

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

fpix_reg.c doesn't compile under Windows #27

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Try to build fpix_reg using Visual Studio 2008

What is the expected output? What do you see instead?
I expect to build fpix_reg.
Instead I get:
Error   1   fatal error C1083: Cannot open include file: 'unistd.h': No such
file or directory   fpix_reg.c  26

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

Please provide any additional information below.
Commenting out the #include I see that it was providing sleep().

Windows has:

  VOID WINAPI Sleep( __in DWORD dwMilliseconds)

Header: Declared in Winbase.h; include Windows.h.

(I tried including Winbase.h, but that just gives lots of undefined errors,
so bite bullet and include Windows.h)

See attached fpix_reg.c for new version.

Original issue reported on code.google.com by tomp2...@gmail.com on 10 Dec 2009 at 9:21

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for the fix.  Modified kernel_reg.c
in the same way.  Will ship in 1.64.

Original comment by dan.bloo...@gmail.com on 10 Dec 2009 at 10:25

GoogleCodeExporter commented 8 years ago
fixed in 1.64 AFAIK.  Windows.h included in fpix_reg.c and kernel_reg.c

Original comment by dan.bloo...@gmail.com on 3 Jan 2010 at 11:44