Subject: RE: Stupid stupid question :/
From: [email-masked] (Colin Peters)

19 Mar 1997 22:29:04 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <01BC3540.0EF13880.cygnus.gnu-win32@gbird0>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Original-To: "[email-masked]'" <[email-masked]>
Original-Cc: "'GNU-Win32'" <[email-masked]>
Original-Sender: [email-masked]

Chris Wall[SMTP:[email-masked]] wrote:
>I'm having problems compiling Win95 gui apps with 17.1. In the faq they
>mention using the -ssubsystem windows option to gcc OR ld, but when I do
>so I get an "invalid option" and "no such file or directory: windows"
>error. There was another part of the mailing list archives/faq (don't
>remember which) that mentioned using a -mwindows switch - which didn't
>work for me either.
>
>The compiler goes on its merry way, and comes to a few functions that
>it's totally confused by, but I am hoping that this is because of the
>lib/target problem I'm having - the program isn't my source, it's a
>cheezy example program with (unfortunately) a MSVC mak file. 

I think (confirmations anyone?) that the "-ssubsystem windows" bit in
the readme is a typo. It should be "--subsystem windows". An easy way
to do this (and not have to fool around too much) is to use gcc to
do your link step with a command line like this:

  gcc -o myexe.exe myexe.o foo.o bar.o -luser32 -Wl,--subsystem,windows

The last bit is the important part.

NOTE: You will, I think, get a "Cannot find entry point _WinMainCRTStartup"
warning or something similar. This should be harmless.

-- 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".