delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/01/04/19:52:35

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Thu, 4 Jan 2001 18:36:00 -0500
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin AT cygwin DOT com, gcc AT gcc DOT gnu DOT org, brolley AT redhat DOT com
Subject: Re: #including <tchar.h> using gcc on Cygwin
Message-ID: <20010104183600.A24434@redhat.com>
Mail-Followup-To: cygwin AT cygwin DOT com, gcc AT gcc DOT gnu DOT org, brolley AT redhat DOT com
References: <3A54FC85 DOT 9030104 AT redhat DOT com> <4 DOT 3 DOT 1 DOT 2 DOT 20010104174839 DOT 022642d0 AT pop DOT ma DOT ultranet DOT com>
Mime-Version: 1.0
User-Agent: Mutt/1.3.11i
In-Reply-To: <4.3.1.2.20010104174839.022642d0@pop.ma.ultranet.com>; from lhall@rfk.com on Thu, Jan 04, 2001 at 05:54:52PM -0500

On Thu, Jan 04, 2001 at 05:54:52PM -0500, Larry Hall (RFK Partners, Inc) wrote:
>At 05:43 PM 1/4/2001, Dave Brolley wrote:
>>Hi,
>>
>>I'm trying to use gcc to compile an application on Cygwin which #includes <tchar.h>. In searching my system, I see a tchar.h in /usr/include/mingw32, but the compiler doesn't seem to be finding it. Is it safe for me to add -I/usr/include/mingw32 to my compile options, or is there a more appropriate way to pick up this header?
>>
>>BTW, what does mingw32 stand for anyway? :-)
>
>It may be OK to do this, but it will be plain luck if it works in this 
>case.  Mingw32 stands for the Mingw initiative, that seeks to provide 
>a compiler toolset to produce executables that don't rely on cygwin1.dll.
>See www.mingw.org for more details.  This directory exists in Cygwin because
>the compiler delivered with Cygwin supports cross-compiling to Mingw.  To
>invoke this cross compiler, use the -mno-cygwin flag.  If you do so, you 
>should find that tchar.h is found, since the compiler will look at this 
>path for cross compiling purposes.  You must make sure that you don't need
>the POSIX functions only available in Cygwin though if you enable this flag,
>since you can't have both Cygwin and Mingw together.  That's why I said 
>initially that you can try doing what you describe, but if it doesn't work
>or causes problems, you're on your own!;-)

Actually, I would not go so far as to say it may be OK.  It is really a
bad idea to include /usr/include/mingw32 unless you are building mingw
applications.  You'll get into all sorts of problems if you try to mix
mingw and cygwin together.  They are mutually exclusive.

If you are compiling a strict Windows app, though, -mno-cygwin is the
right thing to do.

cgf


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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