Hi,
I tried to compile PoDoFo to a DLL, including zlib,jpeg and freetype as
static libs, using the following steps:
1) You need MinGW.
Download "Automated MinGW Installer" from
http://sourceforge.net/projects/mingw/files/
Make directory c:\MinGW and put MinGW-5.1.4.exe there.
Execute MinGW-5.1.4.exe
Install:
- MinGW base tools
- g++ compiler
- MinGW make
(directory c:\MinGW)
Append c:\MinGW\bin to the path
2) You need CMake
cmake-2.6.4-win32-x86.exe (http://www.cmake.org)
3) Download components
podofo-0.7.0.tar.gz (http://podofo.sourceforge.net)
freetype-2.3.9.tar.gz (http://www.freetype.org)
zlib-1.2.3 (http://www.zlib.net)
jpegsrc.v7.tar.gz (http://www.ijg.org)
4) Create directory PoDoFo and extract the downloaded components
4.1) Rename podofo-0.7.0 to podofo
4.2) Rename freetype-2.3.9 to freetype
4.3) Rename zlib-1.2.3 to zlib
4.4) Rename jpeg-7 to jpeg
5) Compile freetype2
cd freetype
mingw32-make.exe
6) Compile ZLIB
cd zlib
mingw32-make -f win32\Makefile.gcc
-static link of zlib:
del libzdll.a
del zlib1.dll
7) Compile libjpeg
cd jpeg
copy jconfig.dj jconfig.h
mingw32-make.exe -f makefile.dj
8) Build PoDoFo
md PoDoFo-dll
cd PoDoFo-dll
cmake -G "MinGW Makefiles" ..\podofo
-DCMAKE_INCLUDE_PATH=..\zlib;..\jpeg;..\freetype\include
-DCMAKE_LIBRARY_PATH=..\zlib;..\jpeg;..\freetype\objs
mingw32-make
The mingw32-make aborts:
[ 36%] Building CXX object src/CMakeFiles/podofo_static.dir/PdfImage.cpp.obj
In file included from C:/a/open/PoDoFo/jpeg/jpeglib.h:27,
from C:\a\open\PoDoFo\podofo\src\PdfImage.cpp:42:
C:/a/open/PoDoFo/jpeg/jmorecfg.h:164: error: conflicting declaration
'typedef long int INT32'
c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/basetsd.h:52:
error: 'INT32' has a previous declaration as `typedef int INT32'
C:/a/open/PoDoFo/jpeg/jmorecfg.h:164: error: declaration of `typedef long
int INT32'
c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/basetsd.h:52:
error: conflicts with previous declaration `typedef int INT32'
C:/a/open/PoDoFo/jpeg/jmorecfg.h:164: error: declaration of `typedef long
int INT32'
c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/basetsd.h:52:
error: conflicts with previous declaration `typedef int INT32'
C:/a/open/PoDoFo/jpeg/jmorecfg.h:234: error: conflicting declaration
'typedef int boolean'
c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/rpcndr.h:52:
error: 'boolean' has a previous declaration as `typedef unsigned char
boolean'
C:/a/open/PoDoFo/jpeg/jmorecfg.h:234: error: declaration of `typedef int
boolean'
c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/rpcndr.h:52:
error: conflicts with previous declaration `typedef unsigned char boolean'
C:/a/open/PoDoFo/jpeg/jmorecfg.h:234: error: declaration of `typedef int
boolean'
c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/rpcndr.h:52:
error: conflicts with previous declaration `typedef unsigned char boolean'
C:\a\open\PoDoFo\podofo\src\PdfImage.cpp: In member function `void
PoDoFo::PdfImage::LoadFromJpegHandle(FILE*, PoDoFo::PdfFileInputStream*)':
C:\a\open\PoDoFo\podofo\src\PdfImage.cpp:252: warning: use of old-style cast
mingw32-make[2]: *** [src/CMakeFiles/podofo_static.dir/PdfImage.cpp.obj]
Error 1
mingw32-make[1]: *** [src/CMakeFiles/podofo_static.dir/all] Error 2
mingw32-make: *** [all] Error 2
Please help.
Regards,
Mirco
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users