在 Windows x64 上构建 xlnt 库

Build xlnt library on Windows x64

本文关键字:xlnt 构建 Windows x64      更新时间:2023-10-16

我尝试从rep构建xlnt库

https://github.com/tfussell/xlnt 在Windows x64上使用cmake: cmake -G "MinGW Makefiles"

并得到错误:

CMake Error at cmake/xlnt.cmake:70 (add_library): 找不到源文件:

../第三方/miniz/miniz.c

尝试扩展 .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx 调用堆栈(最近一次调用优先): CMakeLists.txt:74 (包括)

CMake 错误:CMake 无法确定目标的链接器语言:xlnt.shared CMake 错误:无法确定目标"xlnt.shared"的链接语言。

我是 cmanke 的初学者,但在目录中包含:

xlnt\第三方\miniz.c

我能做些什么来解决这个建筑问题?感谢您的回答

github上的问题:https://github.com/tfussell/xlnt/issues/57

我成功编译库:

待办事项:

  1. 编辑"cmake/xlnt.cmake":更改路径形式。/自。/

SET(MINIZ ./third-party/miniz/miniz.c ./third-party/miniz/miniz.h)

SET(PUGIXML ./third-party/pugixml/src/pugixml.hpp ./third-party/pugixml/src/pugixml.cpp ./

third-party/pugixml/src/pugiconfig.hpp)

我认为这是路径错误。我在项目中发布了关于它的信息。

  1. cmake -G "NMake Makefiles" - VS 编译器的.configure
  2. nmake - 由VS编译器编译