I know that maybe this is a silly question but I can't see through it, I searched for other answers here, that are pretty close to mine, but, still, I didn't understand how to do it.
The problem is that I can't compile a 'C' program that uses curses.h in Windows (I'm using Clion with MinGW), when I try to do it, it gives "undefined reference" for functions in curses.h (Such as 'initscr', 'clear', ...).
Through MinGW Installation Manager I installed "mingw-32-libpdcurses" (There were two available with two different classes: dev and dll; I installed the dll one).
The CMAKEfile i'm using is this:
cmake_minimum_required(VERSION 3.3)
project(Project1)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -lpdcurses")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
file(GLOB Project1_SRC
"*.h"
"*.c"
)
add_executable(Project1 ${Project1_SRC})
What should I change in it in order to make it compile with curses.h?