A debug build error at the last step on Windows using other default options
Hello,
As specified on the home page, I am trying to obtain Debug libraries for being able to step through my code on Windows via Visual Studio IDE. I follow the following steps:
cmake --build . --target OpenXLSX --config Debug
This completes fine with the last message being:
OpenXLSX.vcxproj -> C:\Users\TryerGit\Downloads\OpenXLSX-master\OpenXLSX-master\OpenXLSX\build\Debug\OpenXLSXd.lib
Then, I give the custom prefix command to complete the process thus:
cmake --install . --prefix "C:\Users\TryerGit\OpenXLSX\windows\Debug"
to install the library in the specified folder. However, this fails with the final error message being:
CMake Error at cmake_install.cmake:79 (file):
file INSTALL cannot find
"C:/Users/TryerGit/Downloads/OpenXLSX-master/OpenXLSX-master/OpenXLSX/build/Release/OpenXLSX.lib":
File exists.
Note the folder unnecessarily being referred to is build/Release/ which does not exist given that I am building with Debug flag.
Line 79 refers to the line in the following block of code in cmake_install.cmaks file:
if(CMAKE_INSTALL_COMPONENT STREQUAL "lib" OR NOT CMAKE_INSTALL_COMPONENT)
if(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Dd][Ee][Bb][Uu][Gg])$")
file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY FILES "C:/Users/TryerGit/Downloads/OpenXLSX-master/OpenXLSX-master/OpenXLSX/build/Debug/OpenXLSXd.lib")
elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Rr][Ee][Ll][Ee][Aa][Ss][Ee])$")
file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY FILES "C:/Users/TryerGit/Downloads/OpenXLSX-master/OpenXLSX-master/OpenXLSX/build/Release/OpenXLSX.lib")
elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Mm][Ii][Nn][Ss][Ii][Zz][Ee][Rr][Ee][Ll])$")
file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY FILES "C:/Users/TryerGit/Downloads/OpenXLSX-master/OpenXLSX-master/OpenXLSX/build/MinSizeRel/OpenXLSX.lib")
elseif(CMAKE_INSTALL_CONFIG_NAME MATCHES "^([Rr][Ee][Ll][Ww][Ii][Tt][Hh][Dd][Ee][Bb][Ii][Nn][Ff][Oo])$")
file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY FILES "C:/Users/TryerGit/Downloads/OpenXLSX-master/OpenXLSX-master/OpenXLSX/build/RelWithDebInfo/OpenXLSX.lib")
endif()
endif()
Can it be clarified how I can build debug libraries on Windows ?
Thank you.
non so nulla
Hi @TryerGit. A lot has changed in the library since your original issue creation. Could you please have a look at the most recent master branch version and see if your issue persists, then report back here? Thank you!