Home » Developing U++ » UppHub » Leptonica library support
Re: Leptonica library support [message #30048 is a reply to message #28177] |
Sun, 05 December 2010 07:16 |
o_wild
Messages: 28 Registered: December 2008 Location: Urmqi
|
Promising Member |
|
|
koldo wrote on Fri, 20 August 2010 14:27 | Hello Massimo
I wanted to compile TestLeptonica package in Windows but I have had some problems. I have used MinGW as it has simpler errors.
As there was errors for not finding png.h, tif.h and zlib.h I have added these internal includes to package:
../../uppsrc/plugin/png
../../uppsrc/plugin/tif/lib
../../uppsrc/plugin/z/lib
Compiling I get this errror:
In file included from C:\upp\uppsrc/Draw/Draw.h:6:0,
from C:\upp\uppsrc\plugin\png/png.h:4,
from C:\upp\bazaar\PixRaster\lib\pngio.c:110:
C:\upp\uppsrc/Core/Core.h:39:20: fatal error: typeinfo: No such file or directory
Do you have any idea?
|
You should add 'lib' as internal includes to package plugin/jpg, plugin/tif and plugin/z using package organizer. I've solved it.
However, another error occurs. My platform is Win32, so 'fh' is defined as 'HANDLE',but my compiler(mingw) report an error about the function 'fdopen', see below.
bool Pix::Load(FileIn &fs, int page)
{
int format;
#ifdef WIN32
HANDLE fh;
#else
int fh;
#endif
Destroy();
fh = fs.GetHandle();
if (!fh)
return false;
FILE *fp = fdopen(fh, "r");
if(!fp)
return false;
...
}
error message:
G:\MyApps\PixRaster\PixRaster.cpp:792:27: error: invalid conversion from 'void*' to 'int'
G:\MyApps\PixRaster\PixRaster.cpp:792:27: error: initializing argument 1 of 'FILE* fdopen(int, const char*)'
Wild
|
|
|
Goto Forum:
Current Time: Fri Nov 01 01:14:42 CET 2024
Total time taken to generate the page: 0.02414 seconds
|