Subject: Re: problems building GUI application
From: [email-masked] (Mikey)

4 Nov 1997 16:04:10 -0800
Message-ID: <[email-masked]>
References: <[email-masked]>
Reply-To: [email-masked]
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: Gaffer <[email-masked]>, [email-masked]

The Warning is issued because there is no WinMainCRTStartup in the cygwin32 library,
however crt0.o which is the first thing that is linked in by specs has the proper
entry point (mainCRTStartup), which always gets put at 0x401000, unless you have modified the specs file.

try 

nm --numeric-sort test.exe

and look for mainCRTStartup at 0x401000, if it's there, then the program is being initialized
properly.

Linking libcygwin32.a and libkernel32.a twice once from the specs file, and once from
the command link, activates a well known bug in the B18 linker that will cause
programs to crash randomly, I don't KNOW that that is the problem that you are having,
and I am running 95, so I have no way of testing the effect on NT, but I copied the
program and linked it with my system using the command line I gave you,
and it worked either way.

g++ -o test.exe test.cpp -luser32 (works fine no warnings)
g++ -o test.exe test.cpp -luser32 -Wl,--subsystem,windows (works but gives the warning)

On Tue, 04 Nov 1997 23:41:02 +1100, you wrote:

>Mikey wrote:
>> 
>> Do not include -lcygwin or -lkernel32 on the link line,
>> they are both automatically linked in by the specs file.
>
>i am aware of this, although the c++ file i cut down to make test.cpp
>actually used all those dlls, i read that kernel32 and cygwin were
>included by default, but added them on the command line in case i was
>missing something blantantly obvious by neglecting to link them...
>
>> The warning is harmless, you can ignore it.
>
>its not harmless
>
>the program crashes most terribly, and brings NT4 to its knees - it
>gobbles up all available memory and makes the system crawl until you
>kill the process (not an easy thing considering it takes about 2 mins
>for the task manager to load).
>
>if you are still convinced this is harmless, i can supply you with a zip
>of my source, EXE and make batch file - i would be interested to see if
>the same effects occur on your system.
> 
>
>cheers
>--
>Gaffer [xtatic]
>[email-masked]
>
>6800A007B013CD104F33C0B13FAA40A7E2FB57B1C0AB47E2FC5F4779ECB81210
>99B1FFCD10061E0741BF8001B3638B857F0202C40F92C48A95810203C28A9500
>0503C2C1E802740148AA03C2D1E888853F01E2DAB9400103F94B75D2E5400FC1
>0600018AE0ABABE2F30733FFBEC002B53CF366A5B401CD1674ABB80300CD10C3
>

([email-masked])
delete REMOVETHIS from the above to reply
         Mikey
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".