Hi there,
I tried to build podofo-0.8.4
using the cross-compiling toolchain with Ubuntu 10.10 and
using MinGW32 with Windows XP.
In both cases the compiler complains about the same three errors.
Does anyone build a current version of podofo with MinGW?
Finally I reached to build it, but with changes in the sources.
The first error occurs in PdfCompilerCompatPrivate.h:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/home/toki/Downloads/podofo-0.8.4/src/PdfCompilerCompatPrivate.h:50:8:
Fehler: #error <winsock2.h> must be included before <windows.h>, config
problem?
This is the source fragment that throws the error:
49 # if !defined(_WINSOCK2API_)
50 # error <winsock2.h> must be included before <windows.h>,
config problem?
51 # endif
I tried to find the define of _WINSOCK2API_ which should be in
<winsock2.h> on my system – but nothing –.
Then I checked the www and found that there are different versions of
<winsock2.h> in
CYGWIN / WINE and MINGW-W64.
Here the MINGW-W64 version of <winsock2.h>
http://sourceforge.net/apps/trac/mingw-w64/browser/branches/releases/v1.0/mingw-w64-headers/include/winsock2.h
In this file we find the define of _WINSOCK2API_ as expected.
Here the CYGWIN/WINE version of <winsock2.h>
http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/w32api/include/winsock2.h?rev=1.29&content-type=text/x-cvsweb-markup&cvsroot=src
This version is used with Ubuntu i586-mingw32msvc and MinGW.
There is no define of _WINSOCK2API_, but we could use the define of
_WINSOCK2_H to check if <winsock2.h> was included.
So I changed src/PdfCompilerCompatPrivate.h: line 49 – 51:
49 # if !defined(_WINSOCK2API_) && !defined(_WINSOCK2_H)
50 # error <winsock2.h> must be included before <windows.h>, config
problem?
51 # endif
The second error happens with linking of ContentParser.exe:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Linking CXX executable ContentParser.exe
/usr/lib/gcc/i586-mingw32msvc/4.4.4/../../../../i586-mingw32msvc/bin/ld:
cannot find -lWS2_32
I checked the libs and found:
lib/libws2_32.a
So here is a problem with capital letters that should be lower case or
vice versa.
Modifying CmakeLists.txt line 227
227 SET(PLATFORM_SYSTEM_LIBRARIES kernel32 user32 gdi32 winspool
comdlg32 advapi32 shell32 ole32 oleaut32 uuid WS2_32)
to
227 SET(PLATFORM_SYSTEM_LIBRARIES kernel32 user32 gdi32 winspool
comdlg32 advapi32 shell32 ole32 oleaut32 uuid ws2_32)
works for me.
The last error occurs in
examples/helloworld-base14/helloworld-base14.cpp:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/home/toki/Downloads/podofo-0.8.4/examples/helloworld-base14/helloworld-base14.cpp:31:21:
Error: BaseTsd.h: File not found.
I checked the MinGW includes on my system and found:
include/basetsd.h
Modifying helloworld-base14.cpp solves the error:
30 #ifdef _WIN32
31 #include <BaseTsd.h>
32 #else
33 #include <stdint.h>
34 #endif
to
30 #ifdef _WIN32
31 #include <basetsd.h>
32 #else
33 #include <stdint.h>
34 #endif
With the last modification podofo-0.8.4 builds, installs and works
correct with MinGW32.
Regards,
toki
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users