jacklicn / leptonica

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

psioseg_reg.c doesn't work under Windows #19

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try running psioseg_reg using Windows.

What is the expected output? What do you see instead?
Program fails because it can't write to non-existent directory.

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

Please provide any additional information below.
mkdir doesn't like paths with / in them under Windows.
Later call to ps2pdf also fails. You have to add both Ghostscript lib and
bin directories to system path (but that's not really psioseg_reg's fault).

Change

    system("mkdir /tmp/junkimagedir");
    system("mkdir /tmp/junkmaskdir");

to:

#ifdef WIN32    
    system("mkdir \\tmp\\junkimagedir");
    system("mkdir \\tmp\\junkmaskdir");
#else
    system("mkdir /tmp/junkimagedir");
    system("mkdir /tmp/junkmaskdir");
#endif

Original issue reported on code.google.com by tomp2...@gmail.com on 1 Dec 2009 at 8:44

GoogleCodeExporter commented 9 years ago
As per the discussion in Issue 14, use COMPILER_MSVC instead of WIN32.

Original comment by tomp2...@gmail.com on 3 Dec 2009 at 10:02

GoogleCodeExporter commented 9 years ago
Thanks.  Fixed for 1.64.

Original comment by dan.bloo...@gmail.com on 7 Dec 2009 at 2:43

GoogleCodeExporter commented 9 years ago
fixed in 1.64

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