在Ubuntu上为mingw安装ncurses

时间:2019-01-04 16:19:07

标签: ubuntu mingw ncurses

我有一个可以很好地与g++一起编译的项目。我试图用cross-compile

x86_64-w64-mingw32-g++

但是显然cmake找不到此编译器的ncursesncursessudo apt install libncurses5-dev一起安装(在Ubuntu 18上)。 cmake给出的输出是:

-- 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!

问题:我应该如何安装ncurses使其与mingw编译器一起工作?

1 个答案:

答案 0 :(得分:1)

基本上,您必须交叉编译mingw的ncurses并从中制作/安装软件包。 ncurses来源具有可行的deb / rpm软件包脚本...