0

I have a project that compiles well with g++. I tried to cross-compile it with x86_64-w64-mingw32-g++

But apparently cmake cannot find ncurses for this compiler. ncurses were installed with sudo apt install libncurses5-dev (on Ubuntu 18). The output cmake gives is:

-- The CXX compiler identification is GNU 7.3.0
-- Check for working CXX compiler: /usr/bin/x86_64-w64-mingw32-g++
-- Check for working CXX compiler: /usr/bin/x86_64-w64-mingw32-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.10/Modules/FindCurses.cmake:245 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  alphabetic/demos/XT9Simple/CMakeLists.txt:36 (find_package)


-- Configuring incomplete, errors occurred!

Question: how should I install ncurses so it works with mingw compiler?

1 Answers1

1

Basically, you'd have to cross-compile ncurses for mingw and make/install a package from that. The ncurses sources have workable deb/rpm package scripts...

Thomas Dickey
  • 51,086
  • 7
  • 70
  • 105