79258733

Date: 2024-12-06 16:44:03
Score: 1.5
Natty:
Report link

with the help of @HolyBlackCat and @Tsyvarev I finally found a working CMakeLists.txt. The ncurses specific directories have been added as well as the STATIC directive to enable linking in the windows environment.

cmake_minimum_required(VERSION 3.5.0)
project(hanoi VERSION 0.1.0 LANGUAGES C)
set(SOURCE_FILES hanoi.c)
include_directories("C:\\msys64\\ucrt64\\include\\ncurses")
link_directories("C:\\msys64\\ucrt64\\lib")
add_compile_options(-DNCURSES_STATIC)
add_executable(${PROJECT_NAME} ${SOURCE_FILES})
target_link_libraries(${PROJECT_NAME} ncurses)
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @HolyBlackCat
  • User mentioned (0): @Tsyvarev
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Sheogorat