Subject: Windows API calls that don't work? (Was RE: Stupid stupid question :/)
From: [email-masked] (Colin Peters)

23 Mar 1997 23:53:28 -0800
Sender: [email-masked]
Approved: [email-masked]
Distribution: cygnus
Message-ID: <01BC386B.709FACA0.cygnus.gnu-win32@gbird0>
Original-To: "'A. Phillip Smith'" <[email-masked]>
Original-Cc: "'GNU-Win32'" <[email-masked]>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Original-Sender: [email-masked]

A. Phillip Smith[SMTP:[email-masked]] 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 - [email-masked]
-- 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
"[email-masked]" with one line of text: "help".