2016-07-04 361 views
0

我試着從代表構建XLNT庫

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

建立XLNT庫,並得到錯誤:

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文件containts:

xlnt\third-party\miniz.c

我能做些什麼來解釋這個建築問題? 感謝答案在github

問題:https://github.com/tfussell/xlnt/issues/57

回答

2

我sucessfly編譯庫:

TODO:

  1. 編輯 「的cmake/xlnt.cmake」:改變路徑形式../ to./

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)

我認爲這是路徑錯誤。我在項目中發佈了它。

  • cmake -G "NMake Makefiles" - .configure爲VS編譯
  • nmake - 由VS編譯
  • +1

    您好F4X編譯。你是第一個提出與我的圖書館有關的問題的人,所以恭喜!我會研究你的問題並評論GitHub的問題(https://github.com/tfussell/xlnt/issues/57)。好的偵探工作到目前爲止。 –