Mail Archives: cygwin/2002/10/03/01:08:06
For the sake of completeness: We ran into the resource limit on Win98 with
the Unreal Tournament 2003 Editor and below is a remark from the LoadLibrary
docs:
"Windows 95/98/Me: If you are using LoadLibrary to load a module that
contains a resource whose numeric identifier is greater than 0x7FFF,
LoadLibrary fails. If you are attempting to load a 16-bit DLL directly from
32-bit code, LoadLibrary fails. If you are attempting to load a DLL whose
subsystem version is greater than 4.0, LoadLibrary fails. If your DllMain
function tries to call the Unicode version of a function, LoadLibrary
fails."
-- Daniel, Epic Games Inc.
--------------------- snip ----------------------
Thanks for all your kind pointers! Not!
Anyway I have dug around and found that it turned out to be a problem with
resources. In windows98/ME somehow resource IDs above 40000 (or perhaps
35656?) causes the .exe to become unrecognized.
Anyone is welcome to comment on this, but I am recording this so that
someone searching and finding my previous posts will have a clue as to what
*my* problem was.
/t
"Thomas Nilsson" <thomas DOT nilsson AT progindus DOT se> skrev i meddelandet
aeo42a$lip$2 AT main DOT gmane DOT org">news:aeo42a$lip$2 AT main DOT gmane DOT org...
> 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" <thomas DOT nilsson AT progindus DOT se> skrev i meddelandet
>
01dc01c21692$d1181d50$0300a8c0 AT ThoNi">news:01dc01c21692$d1181d50$0300a8c0 AT Th
oNi...
> 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" <thomas DOT nilsson AT progindus DOT se> skrev i meddelandet
>
00a301c21571$78bb8c40$0300a8c0 AT ThoNi">news:00a301c21571$78bb8c40$0300a8c0 AT Th
oNi...
> 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/
- Raw text -