From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2325 invoked by alias); 2 Nov 2015 12:42:31 -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 2127 invoked by uid 89); 2 Nov 2015 12:42:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qk0-f180.google.com Received: from mail-qk0-f180.google.com (HELO mail-qk0-f180.google.com) (209.85.220.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 02 Nov 2015 12:42:29 +0000 Received: by qkcn129 with SMTP id n129so57584159qkc.1 for ; Mon, 02 Nov 2015 04:42:27 -0800 (PST) X-Received: by 10.55.74.16 with SMTP id x16mr28888704qka.73.1446468147105; Mon, 02 Nov 2015 04:42:27 -0800 (PST) Received: from [192.168.0.9] (d27-96-48-76.nap.wideopenwest.com. [96.27.76.48]) by smtp.gmail.com with ESMTPSA id w18sm7836161qgw.1.2015.11.02.04.42.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Nov 2015 04:42:26 -0800 (PST) Subject: Re: compile ncurses "hello world" to run independent of cygwin? To: cygwin@cygwin.com References: <5636D2C5.6020309@ehdp.com> From: cyg Simple X-Enigmail-Draft-Status: N1110 Message-ID: <56375A3C.6020700@gmail.com> Date: Mon, 02 Nov 2015 12:42:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <5636D2C5.6020309@ehdp.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00028.txt.bz2 On 11/1/2015 10:04 PM, Daniel Goldman wrote: > > $ gcc ncurses-1.c -lncurses > > $ ./a.exe # runs perfectly under cygwin > A Cygwin build using the Cygwin runtime should work. > $ i686-pc-mingw32-gcc -I /usr/include ncurses-1.c -L /lib -lncurses > > $ ./a.exe > Segmentation fault > A MinGW build using the Cygwin runtime should *never* work. > > What am I doing wrong? How do I use cygwin to compile the test ncurses > program so it can run in a dos terminal, independent of cygwin? I looked > around the docs and archives and could not figure out. > You need to specify include and lib paths that contain MinGW libraries. Don't use the Cygwin native paths of /usr/include and /lib. This means that you need a ncurses library that is built with MinGW. -- cyg Simple -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple