Mail Archives: cygwin/1998/04/10/13:36:50
On 8 Apr 98 at 11:19, Colin Peters <colin AT fu DOT is DOT saga-u DOT ac DOT jp>
wrote:
> Hilton Fernandes <hgfernan AT usp DOT br> wrote:
> > To create a console executable you use, say:
> > gcc -o some_exec some_obj_1.o some_obj_2.o
> >
> > To create a console-free, GUI executable, you append
> > -W1,--subsystem,windows,-e,_mainCRTStartup
> >
>
> I believe those "-W1" options above should be -Wl (that is, dash double-yew
> ell, not dash double-yew one). Also, if you use gcc to do your linking (as
> suggested) and if your specs file is correctly set up (as it should be if
> everything else is working) then you could use -mwindows to do the same
> thing (and get those extra libraries too) e.g.
>
> gcc -o hello.exe foo.o bar.o -mwindows
>
> If you are using 0.1.4 of Mingw32 instead of the latest snapshot (the
> versions included with Jan-Jaap's versions of GCC or Mumit Khan's versions
> of EGCS also use -mwindows) then you should use -windows, though I suggest
> you edit the specs file and replace all occurences of %{windows: with
> %{mwindows: and use -mwindows to be consistent with Cygnus and later Mingw32
> releases on this.
>
> Also, not specifying the entry point with -e _mainCRTStartup should not give
> you a warning with the latest snapshot of Mingw32 (or version 0.1.4 either
> if I remember correctly). Even if you do get the warning (could not find
> entry point _WinMainCRTStartup or something like that) it is harmless in all
> the cases I am aware of.
>
Colin Peters,
Thanks for your correction. I'm sorry that i mistyped the "ell"
in the "-Wl" option.
I know the _WinMainCRTStartup warning is harmless, but my C/C++
programmer experience tells me to avoid any warning: between a long
list of harmless warnings can be a __harmful__ warning that will make
the program crash. I believe this is also the original poster
intention.
OTOH, i'm happy that the new compiler versions by you, Mummit Khan
and Jan-Jaap are able to correct this minor nuisance.
Many thanks you for your work,
++Hilton
-------------------
Hilton Fernandes
email: hgfernan AT usp DOT br
www: http://www.lsi.usp.br/~hilton.html (inactive)
M. Sc. Student of Parallel Distributed Applications
at Escola Politecnica (Polytechnic School)
University of S. Paulo - Brazil
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -