Re: gcc as strictly win32 compiler

2003-01-31 Thread Christopher Faylor
On Fri, Jan 31, 2003 at 07:26:12PM -, Max Bowsher wrote:
>If you are not using any of the unix APIs, you may be interested in the
>MinGW project (mingw.sf.net). Cygwin's gcc takes the -mno-cygwin option
>which causes it to function as a MinGW compiler - i.e. the produced exes use
>MSVCRT, not cygwin1.dll.

And as a fish teaching exercise, you might be interested in the command:

gcc -v --help 2>&1 | less

which tells you about -mno-cygwin among other things.

Also, perhaps more importantly, the FAQ has a section entitled "How do I
compile a Win32 executable that doesn't use Cygwin?"

cgf
--
Please use the resources at cygwin.com rather than sending personal email.
Special for spam email harvesters: send email to [EMAIL PROTECTED]
and be permanently blocked from mailing lists at sources.redhat.com

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Re: gcc as strictly win32 compiler

2003-01-31 Thread Timothy C Prince


-Original Message-
From: "Max Bowsher" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
Date: Fri, 31 Jan 2003 19:26:12 -
Subject: Re: gcc as strictly win32 compiler

Sean McBride wrote:
>... as I understand it, cygwin.dll interprets many commands and
> uses MSVCRT.dll on the back end.  How do I create a redistributable
> for users without cygwin, and How badly does this hit performance?

Cygwin does not use msvcrt.dll. It uses newlib as its C library, which is
compiled into cygwin1.dll.
...
If you are not using any of the unix APIs, you may be interested in the
MinGW project (mingw.sf.net). Cygwin's gcc takes the -mno-cygwin option
which causes it to function as a MinGW compiler - i.e. the produced exes use
MSVCRT, not cygwin1.dll.
___
Newlib is not highly optimized, but certain "math library" functions in MSVCRT.dll are 
extremely slow on P4; if you use those functions, you may see a measurable performance 
loss with -mno-cygwin.  I doubt any valid generalizations could be made on performance.


Tim Prince

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: gcc as strictly win32 compiler

2003-01-31 Thread Max Bowsher
Sean McBride wrote:
> I know this is a VERY newbie question, but I have looked on the list
> archives and been confused by the compiler flags for making win apps,
> and the definitions of WIN32 and CYGWIN defines.
>
> I have several straight win32 apps that I wrote using MSVC and I
> simply want to create the executables with gcc rather than MSVC(just
> for fun, does that make me evil?).
>
> I have used gcc with tornado for some embedded apps before, so I am
> not completely unfamiliar with gcc (only for C files though).
>
> I wrote the makefiles, and after a while tinkering with some defines
> and slight syntax changes, I was surprisingly quickly successful at
> getting a code base that compiles on Both MSVC and GCC.  (most of my
> headaches came from MSVC's  implementation of STL)
>
> However, I have a few questions about how this will affect my exes.
>
> Is it possible to compile an exe that does not require the cywin.dll
> if I am not using any of the unix apis and sticking with straight
> win32?  What compiler flags should be used for this and what macros
> do they define?
>
> if not, as I understand it, cygwin.dll interprets many commands and
> uses MSVCRT.dll on the back end.  How do I create a redistributable
> for users without cygwin, and How badly does this hit performance?

Cygwin does not use msvcrt.dll. It uses newlib as its C library, which is
compiled into cygwin1.dll.
You cannot create a redistributable for users without Cygwin. (Short of a
minimal Cygwin install)
If you are not using any of the unix APIs, you may be interested in the
MinGW project (mingw.sf.net). Cygwin's gcc takes the -mno-cygwin option
which causes it to function as a MinGW compiler - i.e. the produced exes use
MSVCRT, not cygwin1.dll.



Max.


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/