This is the mail archive of the
mailing list for the Cygwin project.
Windows API calls that don't work? (Was RE: Stupid stupid question :/)
- To: "'A. Phillip Smith'" <asmith at www dot aeinc dot com>
- Subject: 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: Mon, 24 Mar 1997 15:52:54 +0900
- Cc: "'GNU-Win32'" <gnu-win32 at cygnus dot com>
A. Phillip Smith[SMTP:email@example.com] wrote:
>of fact that the mere INCLUSION of a particular Win32 call caused the
>GUI portion of a program to apparently fail (silent death). Note that
>the code was NEVER invoked, as I stated, so usage errors are not at
>This is further complicted on Windows NT by the fact that unless you strip
>the executable, the binary will not run. Hence you have no VCC++ debugging OR
>gdb debugging capability. Here's another simple program in it's entirety.
>Compile it per the gcc line. It works fine. Now uncomment the statement
>containing the GetFullPathName call, and rebuild. If you get something
>other than the "silent death" behaviour, please share it. This seems like
>a bug to me, unless there's some other link options of which I'm unaware...
[snip - Code example]
It doesn't seem to be a code generation problem, or at least not an easy
one to reproduce. I must point out that I compiled with Mingw32 and not
the normal Cygnus libraries, so there is some chance (small though it may
be) that the Mingw32 environment removes or influences this bug in some
strange way. Another possibility is that it is an NT thing, since I did
the compile on 95 (where you don't have to strip to get a working exec
either, so debugging is possible with GDB). Anyway the point is that it
works, both ways, no problem. (The compile line under Mingw32 is slightly
different, but essentially comes down to the same arguments for cc1 and
Are you using a completely vanilla version of GNU-Win32 or have you made
changes to things (like the startup code for example)? Could you send me
a copy of your silently failing binary?
Colin (If it is a compiler bug lets find it and fix it) Peters.
PS. Any confirmations on that statement about NT from other readers?
Does stripping an executable make it work? Do you *have* to strip
on NT? Is there a difference between the -s link option and using
strip after linking?
-- 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".