I am trying to build podofo-0.9.1 on Windows 7 using MinGW32 (20120426).
My MingGW was built by selecting the minimal install and not selecting any compiler, then
installing the compilers from the mingw-w64project per the build recipe at http://ingar.satgnu.net/devenv/mingw32/base.html Here's what I do: cd /build32 tar zxf podofo-0.9.1.tar.gz mkdir podo-build cd podo-build cmake -G "MinGW Makefiles" ../podofo-0.9.1 \ -DCMAKE_INCLUDE_PATH=/local32/include \ -DCMAKE_LIBRARY_PATH=/local32/lib \ -DPODOFO_BUILD_SHARED:BOOL=FALSE \ -DZLIB_INCLUDE_DIR=/local32/bin \ -DZLIB_LIBRARY_NAMES=zlib1.dll \ -DFREETYPE_LIBRARY_NAMES=libfreetype-6.dll # # have to run twice as cmake objects to a sh.exe in the path # in empty directories. # cmake -G "MinGW Makefiles" ../podofo-0.9.1 \ -DCMAKE_INCLUDE_PATH=/local32/include \ -DCMAKE_LIBRARY_PATH=/local32/lib \ -DPODOFO_BUILD_SHARED:BOOL=FALSE \ -DZLIB_INCLUDE_DIR=/local32/bin \ -DZLIB_LIBRARY_NAMES=zlib1.dll \ -DFREETYPE_LIBRARY_NAMES=libfreetype-6.dll mingw32-make ... What happens is the build fails here: jlpoole@jlpoole-PC /build32/podo-build$ mingw32-make VERBOSE=1C:\MinGW1\opt\bin\cmake.exe -HC:\MinGW1\build32\podofo-0.9.1 -BC:\MinGW1\build32\podo-build --check-build-system CMakeFiles\Makefile.cmake 0 C:\MinGW1\opt\bin\cmake.exe -E cmake_progress_start C:\MinGW1\build32\podo-build\CMakeFiles C:\MinGW1\build32\podo-build\CMakeFiles\progress.marks
C:/MinGW1/mingw32/bin/mingw32-make -f CMakeFiles\Makefile2 all mingw32-make[1]: Entering directory `C:/MinGW1/build32/podo-build'C:/MinGW1/mingw32/bin/mingw32-make -f src\CMakeFiles\podofo_shared.dir\build.make src/CMakeFiles/podofo_shared.dir/depend
mingw32-make[2]: Entering directory `C:/MinGW1/build32/podo-build'C:\MinGW1\opt\bin\cmake.exe -E cmake_depends "MinGW Makefiles" C:\MinGW1\build32\podofo-0.9.1 C:\MinGW1\build32\podofo-0.9.1\src C:\MinGW1\build32\podo-build C:\MinGW1\build32\podo-build\src C:\MinGW1\build32\podo-build\src\CMakeFiles\podofo_shared.dir\DependInfo.cmake --color=
mingw32-make[2]: Leaving directory `C:/MinGW1/build32/podo-build'C:/MinGW1/mingw32/bin/mingw32-make -f src\CMakeFiles\podofo_shared.dir\build.make src/CMakeFiles/podofo_shared.dir/build
mingw32-make[2]: Entering directory `C:/MinGW1/build32/podo-build'C:\MinGW1\opt\bin\cmake.exe -E cmake_progress_report C:\MinGW1\build32\podo-build\CMakeFiles 74 [ 1%] Building RC object src/CMakeFiles/podofo_shared.dir/doc/podofo-doc.rc.obj cd /d C:\MinGW1\build32\podo-build\src && C:\MinGW1\mingw32\bin\windres.exe -O coff -IC:\MinGW1\local32\include -IC:\MinGW1\local32\bin -IC:\MinGW1\build32\podo-build -IC:\MinGW1\build32\podofo-0.9.1 -IC:\MinGW1\build32\podofo-0.9.1\src -IC:\MinGW1\local32\include\freetype2 -IC:\MinGW1\build32\podofo-0.9.1\vcincludes -Wall -Woverloaded-virtual -Wswitch-enum -Wcast-qual -Wwrite-strings -Wredundant-decls -Wreorder -Wold-style-cast -DBUILDING_PODOFO -Dpodofo_shared_EXPORTS -D_CRT_SECURE_NO_DEPRECATE C:\MinGW1\build32\podofo-0.9.1\src\doc\podofo-doc.rc CMakeFiles\podofo_shared.dir\doc\podofo-doc.rc.obj
C:\MinGW1\mingw32\bin\windres.exe: invalid option -- WUsage: C:\MinGW1\mingw32\bin\windres.exe [option(s)] [input-file] [output-file]
The options are:
-i --input=<file> Name input file
-o --output=<file> Name output file
-J --input-format=<format> Specify input format
-O --output-format=<format> Specify output format
-F --target=<target> Specify COFF target
--preprocessor=<program> Program to use to preprocess rc file
--preprocessor-arg=<arg> Additional preprocessor argument
-I --include-dir=<dir> Include directory when preprocessing rc file
-D --define <sym>[=<val>] Define SYM when preprocessing rc file
-U --undefine <sym> Undefine SYM when preprocessing rc file
-v --verbose Verbose - tells you what it's doing
-c --codepage=<codepage> Specify default codepage
-l --language=<val> Set language when reading rc file
--use-temp-file Use a temporary file instead of popen to
read
the preprocessor output
--no-use-temp-file Use popen (default)
-r Ignored for compatibility with rc
@<file> Read options from <file>
-h --help Print this help message
-V --version Print version information
FORMAT is one of rc, res, or coff, and is deduced from the file name
extension if not specified. A single file name is an input file.
No input-file is stdin, default rc. No output-file is stdout, default rc.
C:\MinGW1\mingw32\bin\windres.exe: supported targets: pe-i386 pei-i386
elf32-i386 elf32-little elf32-big srec symbolsrec verilog tekhex binary ihex
mingw32-make[2]: ***
[src/CMakeFiles/podofo_shared.dir/doc/podofo-doc.rc.obj] Error 1
mingw32-make[2]: Leaving directory `C:/MinGW1/build32/podo-build' mingw32-make[1]: *** [src/CMakeFiles/podofo_shared.dir/all] Error 2 mingw32-make[1]: Leaving directory `C:/MinGW1/build32/podo-build' mingw32-make: *** [all] Error 2 jlpoole@jlpoole-PC /build32/podo-build$ An entry from the cmake bug database states:add_definitions() should only be used to add preprocessor defines (-D or /D flag), not compiler flags.
See http://www.cmake.org/Bug/view.php?id=12871In fact, the podofo project has in its zip file, /CMakeLists.txt at line 279:
============ START 279 /CMakeLists.txt =====================
ADD_DEFINITIONS(
-Wall
-Woverloaded-virtual
-Wswitch-enum
-Wcast-qual
-Wwrite-strings
-Wredundant-decls
-Wreorder
-Wold-style-cast
)
============ END =====================
What is the best way to overcome the problem I encountered with windres.exe?
I tried various hacks such as removing the -W flags
(and it compiles fine, but then I runto a problem with the
<cstddef> being unrecognized in PdfCompilerCompat.h ),
but thought it best to present this issue up to this stage to see
what recommendations come forth. Should I log a bug?
John
<<attachment: jlpoole56.vcf>>
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ Podofo-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/podofo-users
