This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: g++ (v.3.1.1-4) -mno-cygwin with a hello world sample crashes oddly


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]