Windows API calls that don't work? (Was RE: Stupid stupid question :/)
Colin Peters
colin@bird.fu.is.saga-u.ac.jp
Sun Mar 23 22:54:00 GMT 1997
A. Phillip Smith[SMTP:asmith@www.aeinc.com] wrote:
[snip]
>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
>issue.
>
>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
ld).
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 - colin@bird.fu.is.saga-u.ac.jp
-- Saga University Dept. of Information Science
-- http://www.fu.is.saga-u.ac.jp/~colin/index.html
-- http://www.geocities.com/Tokyo/Towers/6162/
-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
More information about the Cygwin
mailing list