This is the mail archive of the 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]

Re: problems building GUI application

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.


nm --numeric-sort test.exe

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

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.
>Gaffer [xtatic]

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

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