Subject: Re: linking confusion
From: [email-masked] (Mumit Khan)

13 May 1998 02:52:55 -0700
Message-ID: <[email-masked]>
References: <Pine.GSO.3.96.980511232708.17936A-100000@coke>
To: "Jenny Gable (Skywind)" <[email-masked]>
Cc: Cygnus GNU Win32 Mailing List <[email-masked]>

"Jenny Gable (Skywind)" <[email-masked]> 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
"[email-masked]" with one line of text: "help".