From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27023 invoked by alias); 5 Nov 2015 17:48:56 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 27014 invoked by uid 89); 5 Nov 2015 17:48:55 -0000 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 Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 05 Nov 2015 17:48:54 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 775C0A805F6; Thu, 5 Nov 2015 18:48:51 +0100 (CET) Date: Thu, 05 Nov 2015 17:48:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: Compile test ncurses program to run independent of cygwin? Message-ID: <20151105174851.GA20857@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <563B0A76.3060509@ehdp.com> <1938935272.20151105203026@yandex.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="tKW2IUtsqtDRztdT" Content-Disposition: inline In-Reply-To: <1938935272.20151105203026@yandex.ru> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2015-11/txt/msg00114.txt.bz2 --tKW2IUtsqtDRztdT Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1844 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 Content-length: 819 -----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--