This is the mail archive of the
mailing list for the Cygwin project.
RE: API's that certainly do work. [was; Re: Windows API calls that don't work? (Was RE: Stupid stupid question :/)
- To: "'GNU-Win32'" <gnu-win32 at cygnus dot com>
- Subject: RE: API's that certainly do work. [was; Re: Windows API calls that don't work? (Was RE: Stupid stupid question :/)
- From: Colin Peters <colin at bird dot fu dot is dot saga-u dot ac dot jp>
- Date: Wed, 26 Mar 1997 14:00:50 +0900
Jim Balter[SMTP:email@example.com] wrote:
>A. Phillip Smith wrote:
>> I would prefer to think that the other Smith didn't try to link
>> with the -lkernel32 library. In which case, things probably did
>> work for him. If he ever is inclined to repeat the test with that
>> library, I'm sure he'll agree that this is not a figment of our
>> collective imaginations, and we can end this thread.
>That may not be enough; if I understood Colin Peters correctly, he tried
>your example under win95 and it worked. I would love to try it and
>put this (and brain-damaged DRS) to rest, but I don't have gnu-win32
>installed under win95.
In hopes of helping you end all this I'll come in and point out that
the example was compiled under Mingw32. However, that's not why my
attempt worked. Mine worked because the -lkernel32 on the command line
problem is a "known problem" for Mingw32 (listed on the web page). I
simply wasn't aware that it also happened to Cygwin32 users. The fact
that it does pleases me in a perverse way, because it means it's not
just my problem.
To summarize: The GNU-Win32 version of ld appears to have problems if
you link libkernel32 explicitly (e.g. by putting -lkernel32 on the gcc
command line). This may cause the executable to mysteriously fail under
Cygwin32 or produce a GP fault under Mingw32 (the difference is that
Mingw32 doesn't install it's own exception handler). These problems may
appear or disappear depending on whether certain functions (or numbers
of functions?) are linked from the Win32 API (possibly from kernel32?).
To summarize the summary: Don't link with -lkernel32 on your command
Problem not solved, but at least there's a workaround.
-- Colin Peters - firstname.lastname@example.org
-- Saga University Dept. of Information Science
For help on using this list, send a message to
"email@example.com" with one line of text: "help".