Subject: Re: Jan Jaap's Mingw32
From: [email-masked] (Paul Garceau)

22 Mar 1998 14:13:25 -0800
Message-ID: <[email-masked]>
References: <[email-masked]>
Reply-To: [email-masked]
To: [email-masked]

On 16 Mar 98 at 16:36, the Illustrious Alain CULOS wrote:

> Hi all,
> 
> I have a few questions, only for those that have answers off the top of
> their heads (do not dig information for me, I can do the digging myself)
> :

	(skip)

> 1/ Am I understanding as I should : in Cygwin32, the use of Cygwin32.dll
> makes my own software subject to the GPL.
> 
> 2/ With Mingw32 my software is mine and I can sell it if I wish.

	Would someone in Northern Europe be able to help Alain have a better 
understanding of the GPL?

	As I understand it, any software generated via Cygwin32 or its libs are 
automatically protected under the GPL.  I was unable to find any "readme" 
files that talked about the GPL within Cygwin32 (b19) or the Mingw32 data.

	I believe that the GPL applies for all of the Gnu-Win32 libs and headers 
that might be used.

> 
> 3/ Is the main purpose of Mingw32 (which is to get rid of the Unix layer
> overhead and gain speed) contrary to using Unix tools like Bash ?

	Hmm...I wouldn't say it is contrary.  Mingw32 is defined as a minimal GCC 
package.  It eliminates the Unix overhead required for Cygwin32, as does 
Mingw32-gcc or EGCS for as long as the cygwin32 dll is not being used.

	If you are mainly interested in porting your Unix programs to a Windows 
platform such as Win95 or WinNT then cygwin (GPL protected) is the best 
choice.

	If you are mainly interested in creating only "native" windows (Win32)
code using GCC (GPL protected), then using Mingw32, EGCS or Mingw32-gcc 
would be your best case scenario.

> That
> sounds like a stupid question, but the bash version I have, I gather,
> uses cygwin32.dll ...

	The bash shell is only generated from the cygwin32 package.  All the 
other packages, depending on how you have configured them, do not need the 
bash shell to function properly unless you are using both cygwin32 and one 
of the minimalist packages (EGCS, Mingw32-gcc, or Mingw32).

> 
> 4/ A compiled that worked just perfectly well with Cygwin32 b18 breaks at
> the first stage using Mingw32 Gcc-2.8.1 :

	This is due to the fact that Mingw32-gcc (as most minimalist packages) 
uses the crtdll.dll as its' main interface to the windows platform as 
opposed to cygwin32 which uses the cygwin32x.dll for interfacing to the 
Windows platform.

> 
> In a command.com box, with appropriate PATH and environment as explained
> in JJ's installation page, make says : C:\PROGRAM\V\SRCWIN>make g++ -O3
> -c -I../includew -D_WIN32 VAPP.cpp -o VAPP.o VAPP.cpp: In function `int
> CMain(void *, void *, char *, int)': VAPP.cpp:1032: warning: implicit
> declaration of function `int strtok(...)' VAPP.cpp:1032: warning:
> assignment to `char *' from `int' lacks a cast VAPP.cpp:1036: warning:
> implicit declaration of function `int strchr(...)' VAPP.cpp:1036: ANSI
> C++ forbids comparison between pointer and integer VAPP.cpp:1038:
> warning: assignment to `char *' from `int' lacks a cast
> D:\MINGW32\BIN\MAKE.EXE: *** [VAPP.o] Error 1

	Be sure you have the libstdc++ libs from Jan-Jaap (Mingw32-gcc).  It 
appears that your make is not including those libs.  If you are not 
including them in your c_plus_include and/or c_include environment 
variables than that could cause the above problem.

	Finally, if you have downloaded cygwin32 prior to installation of the 
Mingw32-gcc package, then g++ may be using the Cygwin32 specs in order to 
define its' compile parameters.  Verify that your make is using the 
Mingw32-gcc specs file as opposed to the cygwin32 specs file.

> 
> Does that have anything to do with the change over from Cygwin32 to
> Mingw32 or does it have to do with the change over from 2.7.2 to 2.8.1 ?

	It appears to be related to the change-over from Cygwin32.

	If you did not download the latest libstdc++ libs from Jan-Jaap's site,
this would only complicate matters.  Mingw32-gcc-2.8.1 requires that you
download the latest libstdc++ libs.  If you are using the old gcc libg++
files (prior to the gcc-2.8.0 release) this will also cause problems in 
terms of g++.

> The App I'm trying to compile is V1.17, maybe I should just go and
> download V1.18, I know it has more makefiles and they may be more
> appropriate for me since I'm not anything near to mastering makefiles and
> compiles.

	Can you be more specific about what V1.17 and V1.18 are?  If you are 
trying to build Cygwin32, then you would be better off with V1.19.  If 
not, then be sure that your Mingw32 headers, libs, etc. are being 
implemented properly.

> 
> Note that gcc -v does give the correct version identification :
> D:\Utilisateurs\Alain\Programmation\C\Tests>gcc -v
> Reading specs from D:\MINGW32\lib\gcc-lib\i386-mingw32\2.8.1\specs
> gcc version 2.8.1

	Ok.  Gcc/++ is using the specs file from Mingw32_gcc-2.8.1.

	Mingw32_gcc-2.8.1 is a minimalist package and does not expect any 
cygwin32 header files to be included in its compile-link process.  Any 
cygwin32 header files that Mingw32_gcc-2.8.1 might try and include will 
likely cause gcc/++ to *choke* or *gag* on the cygwin32 headers.

[Check your c_include and c_plus_include environment variables -- verify
that they are set to search the Mingw32-gcc include directories and not
the cygwin32 directories.  Be sure that you are running from the DOS 
Command prompt as well.]

	Hope this helps.

	Peace,

		Paul G.

Information Systems Consultant
NewDawn Productions
http://www.teleport.com/~pgarceau/newdawn/
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".