delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/07/21/13:00:15

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Date: Sun, 21 Jul 2002 13:00:10 -0400
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: g++ (v.3.1.1-4) -mno-cygwin with a hello world sample crashes oddly
Message-ID: <20020721170010.GB1183@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <ahe41c$ar4$1 AT main DOT gmane DOT org> <ahb2lc$9m8$1 AT main DOT gmane DOT org> <1465209200 DOT 20020721094429 AT familiehaase DOT de> <ahe41c$ar4$1 AT main DOT gmane DOT org> <5 DOT 1 DOT 0 DOT 14 DOT 2 DOT 20020721075253 DOT 02c77d90 AT pop3 DOT cris DOT com>
Mime-Version: 1.0
In-Reply-To: <5.1.0.14.2.20020721075253.02c77d90@pop3.cris.com>
User-Agent: Mutt/1.3.23.1i

On Sun, Jul 21, 2002 at 08:00:48AM -0700, Randall R Schulz wrote:
>If you remove the ".exe" extension from a binary executable, it gets 
>treated like a script. Very few binaries are valid script files...
>
>When you use the "-c" option, you suppress the whole linking phase. The 
>output, regardless of its extension, is not a binary executable, it's an 
>object file. If you run the "file" command on your "hiho.exe" or its 
>earlier name: "hiho," you'll see something like this:
>
>% g++ -c hiho.cpp
>% file hiho.o
>hiho.o: 80386 COFF executable not stripped - version 30821
>
>
>Contrast:
>
>% g++ hiho.cpp -o hiho.exe
>% file hiho.exe
>hiho.exe: MS Windows PE Intel 80386 console executable not relocatable

Wow, all of this traffic and Randall is the first, AFAICT, to notice
that someone was using the -c option incorrectly.  When I did my test
case, I actually correctly did not use the -c option to try to create an
executable and I never noticed the cockpit error.

There are something on the order of 22 messages in this thread and it
looks like only one person actually noticed the obvious problem.

>Lastly:
>
>% g++ -mno-cygwin hiho.cpp -o hiho.exe
>hiho.cpp:2: iostream: No such file or directory

I suspect that this particular problem is probably due to the fact that
you haven't installed the latest gcc-mingw package.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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