tasen / leptonica

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

No error message on Windows #42

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,
please find attached example file. When I compile and run it on Linux I got 
error message (example ;-) on console:

 Opening page 6...Warning in pixReadStreamTiff: tiff page 6 not found
Error in pixReadTiff: pix not read

But when I compile it and run it on Windows console, there is no error message:

 Opening page 6...

I would appreciate to have the same behavior on Linux and Windows.

Original issue reported on code.google.com by zde...@gmail.com on 1 Nov 2010 at 8:30

Attachments:

GoogleCodeExporter commented 8 years ago
I just tested your example file using Leptonica 1.66 and Windows XP Pro SP3 and 
got the following correct result:

 Number of found pages: 5
 Opening page 0...... ok.
 Opening page 1...... ok.
 Opening page 2...... ok.
 Opening page 3...... ok.
 Opening page 4...... ok.
 Opening page 5...Warning in pixReadStreamTiff: tiff page 5 not found
Error in pixReadTiff: pix not read

What version of Leptonica are you using?
What version of Visual Studio?
What Windows OS?
Are you using the DLL or the LIB version?

My inclination is to treat this issue as closed/resolved.

Original comment by tomp2...@gmail.com on 2 Nov 2010 at 12:58

GoogleCodeExporter commented 8 years ago
I use Leptonica 1.66 
(http://leptonica.com/source/leptonica-1.66-win32-lib-include-dirs.zip), 
Microsoft Visual C++ 2008 Express Edition, Windows XP SP3. I compiled it in 
"Visual Studio 2008 Command Prompt":

cl /O2 /I "c:\usr\projects\BuildFolder\include" /I 
"c:\usr\projects\BuildFolder\include\leptonica" /D "WIN32" /D "NDEBUG" /D 
"_CONSOLE" /FD /EHsc /MD multipage.c /link 
/LIBPATH:"c:\usr\projects\BuildFolder\lib" leptonlib.lib

Original comment by zde...@gmail.com on 2 Nov 2010 at 7:40

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Sorry for delay in responding. I didn't realize I had to "vote" for the issue 
to get email notifications.

I was able to reproduce this issue when building a release executable linked to 
leptonlib.dll via the command line using Visual Studio 2008. My previous test 
that worked was a debug executable within Visual Studio using the static debug 
library version of Leptonica.

As discussed at http://www.leptonica.org/vs2008doc/building-leptonlib.html the 
Release DLL version of Leptonica (leptonlib.dll) is built with "NO_CONSOLE_IO" 
defined. As such, all error messages are turned off including the "tiff page 5 
not found" messages you are missing. See 
http://leptonica.com/source/README.html for details on NO_CONSOLE_IO usage.

Thus the behavior you are seeing is "Works as designed".

If OTOH you want to see error messages in Release versions of Leptonica you'll 
have to build the library from the sources yourself and remove "NO_CONSOLE_IO".

Original comment by tomp2...@gmail.com on 9 Nov 2010 at 2:44

GoogleCodeExporter commented 8 years ago
The issue is resolved -- error messages are working as designed on Windows

Original comment by dan.bloo...@gmail.com on 9 Nov 2010 at 3:19