本文介绍了在Windows MinGW上构建PoDoFo的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用MinGW在Windows 7上编译PoDoFo 0.9.2.我已经成功编译了 freetype2 OpenSSL zlib .因为我要创建64位应用程序,所以必须将MinGW x64编译器设置为 cmake .所以我这样运行 cmake

Hi I'm trying to compile PoDoFo 0.9.2 on Windows 7 with MinGW. I have successfully compiled freetype2, OpenSSL and zlib. Because i want to create a 64bit application a have to set MinGW x64 compilers to cmake. So I'm running cmake like this

cmake -G "MinGW Makefiles" -DCMAKE_C_COMPILER=c:/MinGW/x64/bin/gcc.exe -DCMAKE_RANLIB=c:/MinGW/x64/bin/ranlib.exe -DCMAKE_INSTALL_PREFIX=. -DPODOFO_NO_MULTITHREAD=TRUE -DCMAKE_RC_COMPILER=c:/MinGW/x64/bin/windres.exe -DCMAKE_MAKE_PROGRAM=c:/MinGW/x64/bin/mingw32-make.exe  -DCMAKE_CXX_COMPILER=c:/MinGW/x64/bin/g++.exe -DCMAKE_INCLUDE_PATH=c:/MinGW/x64/include -DCMAKE_LIBRARY_PATH=c:/MinGW/x64/lib -DPODOFO_BUILD_STATIC=TRUE ..

但是我收到一些未指定的错误

but I'm getting some unspecified error

CMake Warning (dev) in CMakeLists.txt:
  Syntax Warning in cmake code at

    C:/Users/Honza/Downloads/podofo-0.9.2/CMakeLists.txt:144:36

  Argument not separated from preceding token by whitespace.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in CMakeLists.txt:
  Syntax Warning in cmake code at

    C:/Users/Honza/Downloads/podofo-0.9.2/CMakeLists.txt:145:45

  Argument not separated from preceding token by whitespace.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: c:/MinGW/x64/bin/gcc.exe
-- Check for working C compiler: c:/MinGW/x64/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: c:/MinGW/x64/bin/g++.exe
-- Check for working CXX compiler: c:/MinGW/x64/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
WANT_LIB64 unset; assuming normal library directory names
Will install libraries to C:/Users/Honza/Downloads/podofo-0.9.2/build/lib
-- Looking for strings.h
-- Looking for strings.h - found
-- Looking for arpa/inet.h
-- Looking for arpa/inet.h - not found
-- Looking for winsock2.h
-- Looking for winsock2.h - found
-- Looking for mem.h
-- Looking for mem.h - found
-- Looking for ctype.h
-- Looking for ctype.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for BaseTsd.h
-- Looking for BaseTsd.h - found
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
Both PODOFO_BUILD_SHARED and PODOFO_BUILD_STATIC set
  so disabling shared library generation (win32)
Using gcc specific compiler options
Have gcc 4.x
-- Found ZLIB: C:/Program Files/TortoiseGit/bin/zlib1.dll
Found zlib headers in c:/MinGW/x64/include, library at C:/Program Files/Tortoise
Git/bin/zlib1.dll
-- Found LIBCRYPTO: c:/MinGW/x64/lib/libcrypto.a
Found OpenSSL's libCrypto headers in c:/MinGW/x64/include, library at c:/MinGW/x
64/lib/libcrypto.a
-- Could NOT find LIBIDN (missing:  LIBIDN_LIBRARY LIBIDN_INCLUDE_DIR)
Libidn not found. AES-256 Encryption support will be disabled
-- Could NOT find LIBJPEG (missing:  LIBJPEG_INCLUDE_DIR)
libjpeg not found: Library c:/Program Files/Java/jre7/bin/jpeg.dll, headers LIBJ
PEG_INCLUDE_DIR-NOTFOUND
Libjpeg not found. JPEG support will be disabled
-- Could NOT find TIFF (missing:  TIFF_LIBRARY TIFF_INCLUDE_DIR)
Libtiff not found. TIFF support will be disabled
CMake Warning (dev) at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/
FindPNG.cmake:34 (find_package):
  File C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindPNG.cmake
  includes C:/Users/Honza/Downloads/podofo-0.9.2/cmake/modules/FindZLIB.cmake
  (found via CMAKE_MODULE_PATH) which shadows C:/Program Files (x86)/CMake
  2.8/share/cmake-2.8/Modules/FindZLIB.cmake.  This may cause errors later on
  .

  Policy CMP0017 is not set: Prefer files from the CMake module directory
  when including from there.  Run "cmake --help-policy CMP0017" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.
Call Stack (most recent call first):
  CMakeLists.txt:349 (FIND_PACKAGE)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Could NOT find PNG (missing:  PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
LibPng not found. PNG support will be disabled
-- Ensure you cppunit installed version is at least 1.12.0
Cppunit not found. No unit tests will be built.
-- Found OpenSSL: c:/MinGW/x64/lib/libssl.a
Found freetype library at c:/MinGW/x64/lib/libfreetype.dll.a, headers c:/MinGW/x
64/include;c:/MinGW/x64/include
-- Could NOT find Fontconfig (missing:  FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_
DIR)
-- Could NOT find Lua50 (missing:  LUA_LIBRARIES LUA_INCLUDE_DIR)
-- Could NOT find Lua (missing:  LUA_LIBRARIES LUA_INCLUDE_DIR)
Lua not found - PoDoFoImpose and PoDoFoColor will be built without Lua support
Building non multithreaded version of PoDoFo.
Building static PoDoFo library
CMake Error: The following variables are used in this project, but they are set
to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake file
s:
PNG_LIBRARY (ADVANCED)
    linked by target "podofo_static" in directory C:/Users/Honza/Downloads/podof
o-0.9.2/src
    linked by target "ContentParser" in directory C:/Users/Honza/Downloads/podof
o-0.9.2/test/ContentParser
    linked by target "ContentParser" in directory C:/Users/Honza/Downloads/podof
o-0.9.2/test/ContentParser
    linked by target "CreationTest" in directory C:/Users/Honza/Downloads/podofo
-0.9.2/test/CreationTest
    linked by target "CreationTest" in directory C:/Users/Honza/Downloads/podofo
-0.9.2/test/CreationTest
    linked by target "DeviceTest" in directory C:/Users/Honza/Downloads/podofo-0
.9.2/test/DeviceTest
    linked by target "DeviceTest" in directory C:/Users/Honza/Downloads/podofo-0
.9.2/test/DeviceTest
    linked by target "FilterTest" in directory C:/Users/Honza/Downloads/podofo-0
.9.2/test/FilterTest
    linked by target "FilterTest" in directory C:/Users/Honza/Downloads/podofo-0
.9.2/test/FilterTest
    linked by target "FormTest" in directory C:/Users/Honza/Downloads/podofo-0.9
.2/test/FormTest
    linked by target "FormTest" in directory C:/Users/Honza/Downloads/podofo-0.9
.2/test/FormTest
    linked by target "ObjectParserTest" in directory C:/Users/Honza/Downloads/po
dofo-0.9.2/test/ObjectParserTest
    linked by target "ObjectParserTest" in directory C:/Users/Honza/Downloads/po
dofo-0.9.2/test/ObjectParserTest
    linked by target "ParserTest" in directory C:/Users/Honza/Downloads/podofo-0
.9.2/test/ParserTest
    linked by target "SignatureTest" in directory C:/Users/Honza/Downloads/podof
o-0.9.2/test/SignatureTest
    linked by target "SignatureTest" in directory C:/Users/Honza/Downloads/podof
o-0.9.2/test/SignatureTest
    linked by target "TokenizerTest" in directory C:/Users/Honza/Downloads/podof
o-0.9.2/test/TokenizerTest
    linked by target "TokenizerTest" in directory C:/Users/Honza/Downloads/podof
o-0.9.2/test/TokenizerTest
    linked by target "VariantTest" in directory C:/Users/Honza/Downloads/podofo-
0.9.2/test/VariantTest
    linked by target "VariantTest" in directory C:/Users/Honza/Downloads/podofo-
0.9.2/test/VariantTest
    linked by target "WatermarkTest" in directory C:/Users/Honza/Downloads/podof
o-0.9.2/test/WatermarkTest
    linked by target "WatermarkTest" in directory C:/Users/Honza/Downloads/podof
o-0.9.2/test/WatermarkTest
    linked by target "podofobox" in directory C:/Users/Honza/Downloads/podofo-0.
9.2/tools/podofobox
    linked by target "podofocolor" in directory C:/Users/Honza/Downloads/podofo-
0.9.2/tools/podofocolor
    linked by target "podofocountpages" in directory C:/Users/Honza/Downloads/po
dofo-0.9.2/tools/podofocountpages
    linked by target "podofocrop" in directory C:/Users/Honza/Downloads/podofo-0
.9.2/tools/podofocrop
    linked by target "podofoencrypt" in directory C:/Users/Honza/Downloads/podof
o-0.9.2/tools/podofoencrypt
    linked by target "podofogc" in directory C:/Users/Honza/Downloads/podofo-0.9
.2/tools/podofogc
    linked by target "podofoimgextract" in directory C:/Users/Honza/Downloads/po
dofo-0.9.2/tools/podofoimgextract
    linked by target "podofoimg2pdf" in directory C:/Users/Honza/Downloads/podof
o-0.9.2/tools/podofoimg2pdf
    linked by target "podofomerge" in directory C:/Users/Honza/Downloads/podofo-
0.9.2/tools/podofomerge
    linked by target "podofopages" in directory C:/Users/Honza/Downloads/podofo-
0.9.2/tools/podofopages
    linked by target "podofopdfinfo" in directory C:/Users/Honza/Downloads/podof
o-0.9.2/tools/podofopdfinfo
    linked by target "podofotxt2pdf" in directory C:/Users/Honza/Downloads/podof
o-0.9.2/tools/podofotxt2pdf
    linked by target "podofotxtextract" in directory C:/Users/Honza/Downloads/po
dofo-0.9.2/tools/podofotxtextract
    linked by target "podofouncompress" in directory C:/Users/Honza/Downloads/po
dofo-0.9.2/tools/podofouncompress
    linked by target "podofoimpose" in directory C:/Users/Honza/Downloads/podofo
-0.9.2/tools/podofoimpose
    linked by target "podofoincrementalupdates" in directory C:/Users/Honza/Down
loads/podofo-0.9.2/tools/podofoincrementalupdates
    linked by target "podofoxmp" in directory C:/Users/Honza/Downloads/podofo-0.
9.2/tools/podofoxmp
    linked by target "helloworld" in directory C:/Users/Honza/Downloads/podofo-0
.9.2/examples/helloworld
    linked by target "helloworld-base14" in directory C:/Users/Honza/Downloads/p
odofo-0.9.2/examples/helloworld-base14

-- Configuring incomplete, errors occurred!
See also "C:/Users/Honza/Downloads/podofo-0.9.2/build/CMakeFiles/CMakeOutput.log
".
See also "C:/Users/Honza/Downloads/podofo-0.9.2/build/CMakeFiles/CMakeError.log"
.

CMakeOutput.log表示 http://pastebin.com/tBr5G4Mr

CMakeOutput.log conatins this http://pastebin.com/tBr5G4Mr

CMakeError.log包含此 http://pastebin.com/rdYMFfKr

CMakeError.log contains this http://pastebin.com/rdYMFfKr

推荐答案

我是CMake或CMakeLists.txt中的错误.我已经安装了CMake 2.8.3(以前是2.8.12),现在一切正常.

I's a bug in CMake or in CMakeLists.txt. I've installed CMake 2.8.3 (peviously I have 2.8.12) and everything is working now.

这篇关于在Windows MinGW上构建PoDoFo的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-24 00:02