Stupid stupid question :/

Colin Peters colin@bird.fu.is.saga-u.ac.jp
Wed Mar 19 22:06:00 GMT 1997


Chris Wall[SMTP:vergil@midusa.net] 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 - 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