No matter how hard we developers work, writing perfect code, computers stubbornly do not adapt to our code and insist in showing bugs and problems.
Q: I'm having NetPBM problems.
Q: The compiler issues several warning about enum pm_check.
Q: Image input or output is not working correctly.
A: These are very likely to be result of a bad NetPBM install.
For some reason, many Linux distributions still come with old NetPBM libraries. They lack functionality that GOCR could use, and probably have bugs that were already fixed. That would not be so bad if it were not for another problem: if you download the latest NetPBM package (http://netpbm.sourceforge.net), and do a make install, (at least in my computer) the install is not complete. Besides the usual problem of things going to /usr, /usr/local/, /usr/local/share, etc, possibly resulting in keeping the old libraries and executables, the Makefile doesn't install the headers. This will lead to the enum pm_check warnings, which seem kind of harmless, but end up messing everything. Solution: manually install the new headers (which are: pnm.h, pam.h, pbm.h, pgm.h, ppm.h, pbmplus.h and shhopt.h), and make sure that the old libraries are deleted (or at least that symbolic links point to the new ones).
Q: Why TRUE is defined as 0x22A8 (8872 in decimal)?
A: Because UNICODE defines the symbol as TRUE, as
code 0x22A8. If you need to use boolean values, use GOCR_TRUE and
GOCR_FALSE, which are what you want.