This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: linking confusion
- To: "Jenny Gable (Skywind)" <jgable at imsa dot edu>
- Subject: Re: linking confusion
- From: Mumit Khan <khan at xraylith dot wisc dot edu>
- Date: Tue, 12 May 1998 10:16:34 -0500
- Cc: Cygnus GNU Win32 Mailing List <gnu-win32 at cygnus dot 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".