From: khan@xraylith.wisc.edu (Mumit Khan)
Subject: Re: linking confusion
13 May 1998 02:52:55 -0700
Message-ID: <9805121516.AA04931.cygnus.gnu-win32@modi.xraylith.wisc.edu>
References: <Pine.GSO.3.96.980511232708.17936A-100000@coke>
To: "Jenny Gable (Skywind)" <jgable@imsa.edu>
Cc: Cygnus GNU Win32 Mailing List <gnu-win32@cygnus.com>

"Jenny Gable (Skywind)" <jgable@imsa.edu> writes:
> I'm having trouble with linking (first program, using example code), and
> found in the docs,
> 
> "The regular setup allows you to use the option -mwindows on the command
> line to include a set of the basic libraries (and also make your program
> a GUI program instead of a console program), including user32, gdi32
> and, IIRC, comdlg32."
> 
> So says the documentation, but gcc and ld both complain that -mwindows
> isn't a valid option.  So what command line is this talking about?  
> 

There is some inconsistency in the handling of -mwindows by gcc. It allows
it *only* for the link step, and not for the compile step (I'm going to
submit a patch to make it accept in both cases). Here's an example:
   
 OK:

   % gcc -c foo.c
   % gcc -mwindows -o foo foo.o
 
 Not OK:

   % gcc -mwindows -o foo.c

ld doesn't understand -mwindows. It's just a shortcut for GCC that passes
the '--subsystem windows' option to ld as well as supplies some extra
libraries needed for usual GUI "-luser32 -lgdi32 -lcomdlg32".

Regards,
Mumit
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
