delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/02/26/04:32:42

From: alexl AT cre DOT canon DOT co DOT uk (Alex Lyons)
Subject: How to do GUI apps
26 Feb 1997 04:32:42 -0800 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <33141D19.7FB0.cygnus.gnu-win32@cre.canon.co.uk>
Mime-Version: 1.0
X-Mailer: Mozilla 3.01 (X11; I; SunOS 5.5 sun4u)
Original-To: gnu-win32 AT cygnus DOT com
Original-CC: drs AT inxpress DOT net
Original-Sender: owner-gnu-win32 AT cygnus DOT com

drs wrote:
> But this doesn't seem to work. What are we doing wrong?
> 
> bash$ gcc -o win.exe win.o -ssubsystem windows -mwindows
> gcc: windows: No such file or directory
> gcc: unrecognized option `-ssubsystem'
> 
> --DRS

The answer is to use

-Wl,--subsystem,windows

on the gcc or g++ command line.

This works although it gives a (apparently harmless) linker warning
about an unknown entry point. This warning can be removed by using
the linker -e option.

Notice
(1) both --subsystem and windows are passed to the linker using -Wl
(2) if you use -ssubsystem rather than --subsystem (as it says in the
FAQ) the resulting executable works on Windows 95 but not under NT.
(Something to do with the way in which the linker strips the symbol
table I think.)
---
Alex Lyons MA PhD		   mailto:alexl AT cre DOT canon DOT co DOT uk
Computer Vision Group		   http://www.cre.canon.co.uk/
Canon Research Centre Europe Ltd   tel: +44-1483-448844
Guildford, Surrey, GU2 5YF, UK	   fax: +44-1483-448845
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019