|
From: | Pierre Blavy |
Subject: | compile ncurse with mingw |
Date: | Wed, 1 Feb 2023 12:24:46 +0000 |
Hello,
I'm trying to cross compile ncurse 6.3 patch 20211021 on fedor37 for windows using
./configure --host=i686-w64-mingw32 --prefix=/tmp/test/ncurses-win32; mingw32-make;
=== DWORD ===
First I've got the following error :
../ncurses/./tinfo/lib_napms.c:82:12: error: 'DWORD' undeclared (first use in this function)
This error can be worked-around by adding #include <windows.h> before all other includes in /ncurses/./tinfo/lib_napms. I'm unsure about how windows related includes should be added to the code withoud breaking things, but there is probably something to change in .configure to make the lib_napms.c file include windows.h when appropriate.
=== undefined references ===
Then the linker produces undefined references
make[1]: Entering directory '/tmp/test/ncurses-6.3/progs'
https://lists.gnu.org/archive/html/bug-ncurses/2019-11/msg00022.html
So I've tried : ./configure --host=i686-w64-mingw32 --prefix=/tmp/test/ncurses-win32 --enable-term-driver
But I get a new error Entering directory '/tmp/test/ncurses-6.3/progs'
I searched for missing function with cd /usr/i686-w64-mingw32/sys-root/mingw/lib nm -A --defined *.a | grep __strcpy_chk
Result: libssp.a:strcpy-chk.o:00000000 T ___strcpy_chk It exists in libssp, but I was confused as the missing function is '__strcpy_chk' (prefixed by 2 underscores) but libssp.a defines '___strcpy_chk' (prefixed by 3 underscores). I don't know how to investigate any further.
==> How to compile properly ncurses on a linux host, for a windows target, using mingw ? ==> Is there a way to fix the ./configure script, so it works out of the bow, with the usual "./configure --host=i686-w64-mingw32" command ?
Best regards!
|
[Prev in Thread] | Current Thread | [Next in Thread] |