Subject: Re: GCC 2.95.3-5 produces .exe un-executable under w98 and ME
From: "Thomas Nilsson" <[email-masked]>
To: [email-masked]
Date: Tue, 18 Jun 2002 22:09:55 +0200
Newsgroups: gmane.os.cygwin

Ok, I was trying to be polite but I really need some pointers here. I don't
want to "Why did you break everything..." Please?

/Thomas

"Thomas Nilsson" <[email-masked]> skrev i meddelandet
news:01dc01c21692$d1181d50$0300a8c0@ThoNi...
I have researched the matter further and discovered that it only applies to
Windows applications. When I link with "-mwindows" I get:

/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/../../../../i686-pc-cygwin/bin/ld:
warning: cannot find entry symbol _WinMainCRTStartup; defaulting to 00401000

Adding "-e _mainCRTStartup" as per the GNU Pro manuals (which I have not
needed to do before) did only remove the message. The .exe's was still not
executable on win98 or ME.

How can I find out why w98 and ME don't like the executables?

I can't find any information about the various cygwin crt*.o and for which
options
they are used. Should any of them not contain WinMainCRTStartup? Could
somebody
point me in a direction please?

I am attaching a "gcc -v" printout.

/Thomas

gcc -o
run -g -v -mwindows -Wall -funsigned-char  -I../../WindowsGLK/Include -DGLK
-DWINGLK glkstart.o glkio.o exe.o arun.o sysdep.o rules.o debug.o args.o
inter.o parse.o stack.o decode.o term.o reverse.o readline.o params.o main.o
alan.version.o winglk.o arun.res -g -mwindows  ../../WindowsGLK/Glk.lib
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/specs
gcc version 2.95.3-5 (cygwin special)
 /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/collect2.exe --subsystem
windows -Bdynamic --dll-search-prefix=cyg -o arun.exe
/usr/lib/crt0.o -L/usr/local/lib -L/usr/lib -L/usr/lib/w32api -L/usr/lib/gcc
-lib/i686-pc-cygwin/2.95.3-5 glkstart.o glkio.o exe.o arun.o sysdep.o
rules.o debug.o args.o inter.o parse.o stack.o decode.o term.o reverse.o
readline.o params.o main.o alan.version.o winglk.o arun.res
../../WindowsGLK/Glk.lib -lgcc -lcygwin -lgdi32 -lcomdlg32 -luser32 -lkernel
32 -ladvapi32 -lshell32 -lgcc
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/../../../../i686-pc-cygwin/bin/ld:
warning: cannot find entry symbol _WinMainCRTStartup; defaulting to 00401000
make: [winglk] Error 1 (ignored)

"Thomas Nilsson" <[email-masked]> skrev i meddelandet
news:00a301c21571$78bb8c40$0300a8c0@ThoNi...
I am a pleased cygwin user since many years. It has always served me well as
a platform for easy cross-platform development.

However I recently found that GCC produced .EXEs that run on NT and w2000
but not on 98 & ME. Message produced on failing systems is "The
<file> file appears to be corrupt. Reinstall the file, and then try again."
And then "Windows can not run this file because it is in the wrong format."

This occurs with both cygwin and mingw compiles on both w2k and w98.

I have GCC 2.95.3-5, binutils 20011002-1, win32 1.5-1.

I am sure this problem did not exist about a month ago. I have definitely
upgraded cygwin and made a couple of changes to the software since then.
What kind of changes to my software could have cause this behaviour?

/Thomas Nilsson

--
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/

--
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/

--
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/