comp.lang.ada
 help / color / mirror / Atom feed
* mingw vs cygwin
@ 2006-01-30 14:57 midgleyben
  2006-01-31  0:51 ` Jeffrey Creem
  2006-01-31  2:29 ` Stephen Leake
  0 siblings, 2 replies; 5+ messages in thread
From: midgleyben @ 2006-01-30 14:57 UTC (permalink / raw)


I have a question about the differences between cygwin adn mingw, with
reference to the ada compiler.

I need to port ada code to XP from linux, link c code (maybe c++) to
the project and create an exe which supports sockets (networking). So
which way mingw or cygwin ? I have read so many reports of problems
with c under mingw and just problems with gcc-ada but non particularly
up to date, any advice welcome.

Also if I get the whole cygwin installation I get mingw too, to my
understanding if I use mingw I statically link support for the windows
API and if I use the gcc-ada compiler I need to provide cygwin1.dll for
distribution, is this accurate and can anyone add detail to this
explanation ? 

Thanks in advance




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mingw vs cygwin
  2006-01-30 14:57 mingw vs cygwin midgleyben
@ 2006-01-31  0:51 ` Jeffrey Creem
  2006-01-31  2:29 ` Stephen Leake
  1 sibling, 0 replies; 5+ messages in thread
From: Jeffrey Creem @ 2006-01-31  0:51 UTC (permalink / raw)


midgleyben@hotmail.com wrote:
> I have a question about the differences between cygwin adn mingw, with
> reference to the ada compiler.
> 
> I need to port ada code to XP from linux, link c code (maybe c++) to
> the project and create an exe which supports sockets (networking). So
> which way mingw or cygwin ? I have read so many reports of problems
> with c under mingw and just problems with gcc-ada but non particularly
> up to date, any advice welcome.
> 
> Also if I get the whole cygwin installation I get mingw too, to my
> understanding if I use mingw I statically link support for the windows
> API and if I use the gcc-ada compiler I need to provide cygwin1.dll for
> distribution, is this accurate and can anyone add detail to this
> explanation ? 
> 
> Thanks in advance
> 

If you go to any "help" newsgroup you will find nothing but problems 
about a topic so first of all I would not get too worked up about seeing 
"nothing but problems" with people doing C under mingw.

Next, you do not need to provide cygwin1.dll for Ada code that is built 
from a mingw based distribution.

The question is, do you need capability that is present in the cygwin 
dll or not. The cygwin dll provides essentially a unix compatibility 
layer. Depending on the nature of your code, you might not need it at all.

If you do think you need it, you need to understand the licensing terms 
of the cygwin dll which is essentially (last time I checked) GPL (not 
LGPL). (Though I think you can buy a license under different terms from 
Redhat).

If you need to link your code against the standard cygwin dll then you 
will need to distribute your application under the terms of the dll 
(read the GPL for details. Short story, you have to give the source code 
to everyone you give the binary to and you can't limit who they give the 
source code to).


The standard AdaCore GNAT build executables that are mingw based. The 
cygwin.dll that is inside of most of the GNAT windows binary 
distributions is there (I think) to support the GDB install which is 
cygwin based.


In general, I would not recommend the cygwin approach unless it is 
critical to a successful port.






^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mingw vs cygwin
  2006-01-30 14:57 mingw vs cygwin midgleyben
  2006-01-31  0:51 ` Jeffrey Creem
@ 2006-01-31  2:29 ` Stephen Leake
  2006-02-06 12:45   ` Craig Carey
  1 sibling, 1 reply; 5+ messages in thread
From: Stephen Leake @ 2006-01-31  2:29 UTC (permalink / raw)


midgleyben@hotmail.com writes:

> I have a question about the differences between cygwin adn mingw, with
> reference to the ada compiler.
>
> I need to port ada code to XP from linux, link c code (maybe c++) to
> the project and create an exe which supports sockets (networking). So
> which way mingw or cygwin ? I have read so many reports of problems
> with c under mingw and just problems with gcc-ada but non particularly
> up to date, any advice welcome.

As Jeffrey said, it depends on your C code.

I use GNAT (comercially supported) with C code in my project, and it's
just fine. That's a mingw run-time. I use the cygwin tools to build
everything, because bash is _so_ much nicer than the DOS shell.

> Also if I get the whole cygwin installation I get mingw too, to my
> understanding if I use mingw I statically link support for the windows
> API 

Only if you are using the Windows API.

> and if I use the gcc-ada compiler I need to provide cygwin1.dll for
> distribution, is this accurate and can anyone add detail to this
> explanation ?

You can tell the cygwin gcc-ada compiler to generate code using the
mingw runtime; I believe the switch is -mingw, but I haven't tried it.

You should seriously consider getting AdaCore support; it is very good
- by far the best support from any vendor I've ever had.

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mingw vs cygwin
  2006-01-31  2:29 ` Stephen Leake
@ 2006-02-06 12:45   ` Craig Carey
  2006-02-06 14:38     ` Georg Bauhaus
  0 siblings, 1 reply; 5+ messages in thread
From: Craig Carey @ 2006-02-06 12:45 UTC (permalink / raw)


On Mon, 30 Jan 2006 21:29:45 -0500, Stephen Leake <...e@acm.org> wrote:
>midgleyben@hotmail.com writes:
...
>> which way mingw or cygwin ? I have read so many reports of problems
>> with c under mingw and just problems with gcc-ada but non particularly
...
>
>I use GNAT (comercially supported) with C code in my project, and it's
...

How much does that support from the US AdaCore, cost?.

It seems to be a mistake to recommend paying with there being exactly
one option. 

>You should seriously consider getting AdaCore support; it is very good
>- by far the best support from any vendor I've ever had.

Maybe AdaCore withholds little bits of information, eg. that MinGW C
would mix with GNAT 3.15p in one *.exe if this is added:

  typedef double Real __attribute__ ((aligned (4)));

The GNAT documents didn't mention that. For the swiftest compile
times, a GCC 2.8.1 Ada would be used with GCC 3.x.x C/C++.

Comments alleging that GCC is getting lessa and less able to build
a correct executables, at least since maybe August 2003, is at the
GMP big numbers package:  http://swox.com/gmp/

So a logical is to not pay for the compiler; but what about the
support ?. Are the C++ pragmas and binutils objdum, and all the
rest of the tools, debugged as a reult of good service ?.


-- Craig Carey



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mingw vs cygwin
  2006-02-06 12:45   ` Craig Carey
@ 2006-02-06 14:38     ` Georg Bauhaus
  0 siblings, 0 replies; 5+ messages in thread
From: Georg Bauhaus @ 2006-02-06 14:38 UTC (permalink / raw)


Craig Carey wrote:

> Comments alleging that GCC is getting lessa and less able to build
> a correct executables, at least since maybe August 2003, is at the
> GMP big numbers package:  http://swox.com/gmp/

Actually, the comments indicate that the situation is improving
more and more. Same page says,
"We've had some luck with GCC 3.4.x on some systems,..."
"UPDATE: We've had much more luck with GCC 4.0.1.
It might actually be a usable compiler, but the usual care should be applied."

-- Georg 



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-02-06 14:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-30 14:57 mingw vs cygwin midgleyben
2006-01-31  0:51 ` Jeffrey Creem
2006-01-31  2:29 ` Stephen Leake
2006-02-06 12:45   ` Craig Carey
2006-02-06 14:38     ` Georg Bauhaus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox