我尝试在Windows 10(64位)计算机上构建PoDoFo
- Library version 0.9.4。
我按照开发人员的指示和我在Stackoverflow上找到的一些内容。所以我做了以下步骤但是它们导致了这个错误:
Scanning dependencies of target podofo_shared
[ 0%] Building CXX object src/CMakeFiles/podofo_shared.dir/base/PdfArray.cpp.obj
In file included from C:\Users\PeterFox\Downloads\podofo-src\src\base\PdfDefinesPrivate.h:9:0,
from C:\Users\PeterFox\Downloads\podofo-src\src\base\PdfArray.cpp:37:
C:\Users\PeterFox\Downloads\podofo-src\src\base\PdfCompilerCompatPrivate.h: In function 'int PoDoFo::compat::strcasecmp(const char*, const char*)':
C:\Users\PeterFox\Downloads\podofo-src\src\base\PdfCompilerCompatPrivate.h:87:16: error: '::stricmp' has not been declared
return ::stricmp(s1, s2);
^
C:\Users\PeterFox\Downloads\podofo-src\src\base\PdfCompilerCompatPrivate.h: In function 'int PoDoFo::compat::strncasecmp(const char*, const char*, size_t)':
C:\Users\PeterFox\Downloads\podofo-src\src\base\PdfCompilerCompatPrivate.h:101:16: error: '::strnicmp' has not been declared
return ::strnicmp(s1, s2, n);
^
src\CMakeFiles\podofo_shared.dir\build.make:62: recipe for target 'src/CMakeFiles/podofo_shared.dir/base/PdfArray.cpp.obj' failed
mingw32-make[2]: *** [src/CMakeFiles/podofo_shared.dir/base/PdfArray.cpp.obj] Error 1
CMakeFiles\Makefile2:116: recipe for target 'src/CMakeFiles/podofo_shared.dir/all' failed
mingw32-make[1]: *** [src/CMakeFiles/podofo_shared.dir/all] Error 2
Makefile:126: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
以下是我所做的步骤:
首先在我的机器上安装MinGW并将bin-folder添加到PATH-var。然后我用所有软件包和CMake安装了GnuWin32。这三个都是最新版本。
我需要将 Zlib
和Freetype
个库安装到Gnuwin目录中。
然后我解压缩了PoDoFo-Source并在那里创建了一个名为build的目录并更改为它。从那里我以这种方式运行cmake
:
cmake -G "MinGW Makefiles" -DCMAKE_INCLUDE_PATH=C:\gnuwin32\include -DCMAKE_LIBRARY_PATH=C:\gnuwin32\lib -DPODOFO_BUILD_SHARED:BOOL=FALSE ..
这里没有错误,一切正常并且符合预期。然后我运行mingw32-make
来构建库,但后来我得到了上面的错误,其中包含stricmp
- 函数的todo。
那么我该如何解决这个问题呢?有解决方案吗谢谢!