This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: MINGW32
- To: help-gcc at gnu dot org
- Subject: Re: MINGW32
- From: "Uri Yanover" <uriyan at yahoo dot com>
- Date: Tue, 23 Nov 1999 22:23:40 +0200
- Newsgroups: gnu.gcc.help
- Organization: Bezeq International Ltd.
- References: <3839a2d9@news.bezeqint.net> <81cacv$mjm$1@news.doit.wisc.edu>
- Xref: wodc7nx0 gnu.gcc.help:1942
Thanks for the helpful information!
I was using MINGW32 based on GCC 2.8.1 under Windows 95's DOS box and I
never knew that there was a newer vesion.
Thanks again,
Uri
Mumit Khan <khan@xraylith.wisc.edu> wrote in message
81cacv$mjm$1@news.doit.wisc.edu">news:81cacv$mjm$1@news.doit.wisc.edu...
> In article <3839a2d9@news.bezeqint.net>, Uri Yanover <uriyan@yahoo.com>
wrote:
> >Hello anybody!
> >I am a beginning programmer for Windows. I heard of GNU ports for
> >DOS/Windows. I chose MINGW32 , so I downloaded the binaries, the
libraries,
> >the tools etc. I installed it (unzipped and set up the environment). Then
I
> >compiled and linked a few examples (one from the SDK and one from
Petzold)
> >using the main libraries (user32, gdi32, kernel32, comdlg32 and
comctl32),
> >like this.
>
> What version are you running? The latest versions are at:
>
> http://www.xraylith.wisc.edu/~khan/software/gnu-win32/
>
> No setup required, just run self-extracting executable to install,
> add the binary directory to PATH and go.
>
> >SET DEFAULTLIB=c:\mingw32\lib
>
> Not needed in the new releases (4 in the last 1-1/2 years or so).
>
> >SET
GUILIBS=-L%DEFAULTLIB% -luser32 -lgdi32 -lkernel32 -lcomdlg32 -lcomctl32
>
> -luser32 and -lkernel32 are automatically linked in, so no need. `gcc -v'
> when linking shows exactly what's being linked in, so that's a good
> diagnostic tool.
>
> >gcc -c hellowin.c
> >gcc -o hellowin.exe hellowin.o %GUILIBS%
>
> Add -mwindows, which expands to the following, to avoid the DOS window:
> -Wl,--subsystem,windows -lgdi32 -lcomdlg32
>
> So, the following are equivalent:
>
> $ gcc -c hellowin.c
> $ gcc -o hellowin.exe hellowin.o -mwindows -lcomctl32
>
> To see what's going on, add the -v option:
>
> $ gcc -v -o hellowin.exe hellowin.o -mwindows -lcomctl32
>
> Mingw32 questions are probably best posted to the appropriate mailing
> lists -
>
> - Cygwin -- http://sourceware.cygnus.com/lists.html) -- Mingw and Cygwin
> share the same development tools, so the answers are the same.
> - Mingw32 -- http://www.eGroups.COM/lists/mingw32.html
>
> Regards,
> Mumit
>