gpt4 book ai didi

c++ - 在 Windows x64 上构建 xlnt 库

转载 作者:行者123 更新时间:2023-11-28 02:04:19 28 4
gpt4 key购买 nike

我尝试从 rep 构建 xlnt 库

https://github.com/tfussell/xlnt on Windows x64 using cmake: cmake -G "MinGW Makefiles"

并得到错误:

CMake Error at cmake/xlnt.cmake:70 (add_library): Cannot find source file:

../third-party/miniz/miniz.c

Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx Call Stack (most recent call first): CMakeLists.txt:74 (include)

CMake Error: CMake can not determine linker language for target: xlnt.shared CMake Error: Cannot determine link language for target "xlnt.shared".

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

xlnt\third-party\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" - .configure 用于 VS 编译器
  2. nmake - 通过 VS 编译器编译

关于c++ - 在 Windows x64 上构建 xlnt 库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38193018/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com