[poppler] PATCH: Add includes to pdftocairo to compile in mingw
ajohnson at redneon.com
Fri Aug 25 12:25:12 UTC 2017
On 25/08/17 03:54, Albert Astals Cid wrote:
> Hi, i need this patch to be able to compile pdftocairo with mingw.
> Any reason not to commit it?
I managed to get a cmake mingw cross compile working and also got the
same error on pdftocairo-win32.cc. I compiled this file with verbose on
with both autotools and cmake and compared the options.
The reason the cmake builds needs these includes is it is defining
-DWIN32_LEAN_AND_MEAN which causes windows.h to include only a subset of
the windows API. So adding these includes is fine.
I also noticed another difference between autotools and cmake. Autotools
is compiling with -std=c++11. Cmake is using -std=gnu++11. I think
-std=c++11 is better so as to avoid using anything that won't work with
There is also some additional mingw stuff in configure.ac:
win32_libs="-lgdi32 -lwinspool -lcomdlg32"
I could not see this in cmake. It seems to compile without it. Not sure
if it is needed for anything.
More information about the poppler