delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/11/05/12:49:12

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=I4kAUtzQiA/Q0JoUV0aGoerXr/1d8OJPetrWvoaF9R1fVuaCekIDQ
bQhE9dm7ziw42nzAItr48iVtLvERiTfRFq/nAmuQzpyu0RkBHj75PNF/rYqAxm6A
grg0oxJwHM2t88w75z393s2dUYGVH2U9JjiN+nj3rFZlZRyoYOwzzw=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=AyEytTZznBZ4zBKClIa2mB3Tpw0=; b=WmVju831e4tzmYbyYkOYY7AL/j5B
46pTGSwrzJM8Fuhm7Zd70ehNQYRoKml/lcMUYcfHl/alsrnZO2zscQTOzNYdHcPV
JiwaR81SF52ZYpl0m52R+YqHoNeJCdCUu1FsNA1QvmYPiVlH9FLqUOKsQBTVrebk
zNr2pPZzIx1yMdE=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-5.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2
X-HELO: calimero.vinschen.de
Date: Thu, 5 Nov 2015 18:48:51 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Compile test ncurses program to run independent of cygwin?
Message-ID: <20151105174851.GA20857@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <563B0A76 DOT 3060509 AT ehdp DOT com> <1938935272 DOT 20151105203026 AT yandex DOT ru>
MIME-Version: 1.0
In-Reply-To: <1938935272.20151105203026@yandex.ru>
User-Agent: Mutt/1.5.23 (2014-03-12)

--tKW2IUtsqtDRztdT
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Nov  5 20:30, Andrey Repin wrote:
> Greetings, Daniel Goldman!
>=20
> > # Found /usr/x86_64-pc-cygwin/sys-root/usr/lib/libncurses.a
> > # Will this let me compile for dos window? Apparently not.
> > $ i686-pc-mingw32-gcc \
      ^^^^=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20
      So you're building for 32 bit mingw

> > -I /usr/x86_64-pc-cygwin/sys-root/usr/include/=20
            ^^^^^^^^^^^^^^^^
	    Pointing the compiler to header files for a Cygwin build,
	    which is a *different* target (i686 vs. x86_64 *and* mingw
	    vs. cygwin)...

> > ncurses.c -L /usr/x86_64-pc-cygwin/sys-root/usr/lib/ -lncurses
                      ^^^^^^^^^^^^^^^^
		      same here

> > ... undefined reference to `initscr'
> > ... more "undefined reference" error messages

...and that's logical result.  Along the same lines you could try to
link powerpc-linux ncurses against arm-freebsd binary.  That just won't
work.

What you need is a i686-mingw ncurses.  Have a look around on the net or
try to build your own.  However, it will probably not work correctly in
a Cygwin pseudo tty due to lack of the Cygwin compat layer implementing
them.

> > ------------------------------------------------------------
>=20
> > My questions:
>=20
> > 1) Did I make a compile-line syntax error? Is there a variation of the=
=20
> > i686-pc-mingw32-gcc command line so I can use cygwin to compile=20
> > ncurses.c to run in dos window, independent of cygwin?
>=20
> I'm no expert, but my first answer would be "yes".
> You shouldn't use cross-compilers directly, rather, use appropriate GCC
> switches to specify host and target subsystems.

Nope, use cross compilers.


Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--tKW2IUtsqtDRztdT
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJWO5aDAAoJEPU2Bp2uRE+gbcIQAIIt3U4LswrDaYD3g+B+QGdY
357jMySaFD9YHRDBJAcuQKCujC709A4t19ayzdNhm5bcJCICy4WZH2Nr7nm6kmPP
9C64ChBfGrE9vNsU4DvRxyHiukz5EqbvT7E7gImr/xcgQuWXO1LP/JuniLO549lW
8m2Azl9wuJ7lSNiodMyubMgAujPnPk/o5/3rvn1QuuZJfUAf+xX6GszBsMzILCSf
7EQHU7jp+3C9N5byE4xXb1OXXZuYIE6PvQJSkXhME6c3f2UuZx71+fT7vHk+t7kA
YP4bj9aBahipW+aFId9dzz/pqxeskEfVFuApGEPwIvY227VqT4V0vIleRSw9PCNl
0HzjhHpLcQSmwu9+hL8kdgp5rbccEcnHKBUZQ6fXvO8c5r9P7YTPlLGXBX0SWf4w
x5QA4vkPC+RtjNDu1DZONpUob+1aw3XexFnCdM7DuhaysdsMmGaoJXYD+0tdPMq9
uR0ThGyqMdyO8A5Y1kXmTCD0r6Ul8vNcIXXn+asOsw1KUnSG/OGj0HUfqfYZlAea
myamV76dxL6wWeDVj11xy5QDsoIaER+soqdDFGwUncQe//dO9w6A8Tx6BJz/17bU
PFSivpkrVv+qKxPrp6VAWhGt5UIN46C3zOqcQbXbSbpnp8BQrcwWw7PlqVFlExXe
vbrr1KfQOeAamVZuQ8Pa
=0gqR
-----END PGP SIGNATURE-----

--tKW2IUtsqtDRztdT--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019