Re: [gtkmm] Win32 development installation instructions

On Mon, 2004-03-08 at 05:04, Cedric Gustin wrote:
> At 11:34 AM 3/8/2004, Daniel Sundberg wrote:
> >The instructions I want to find was actually using the mingw compiler but 
> >in the cygwin environment. You have to modify some paths and install 
> >things on the right place if everything is going to work "out of the box". 
> >I would like to find this guide so that I don't have to go through all the 
> >trouble that might occur.

I'd appreciate any comment on the remarks below,  to make sure I've got 
this right.

It seems to me that there are at least 4 different possible
configurations that people might mean when they loosely refer to
"cygwin" under Windows.

1.  The cygwin development environment which resembles a unix 
environment in which you compile code containing POSIX calls and which 
produces executables depending on cywin.dll for POSIX emulation.

2.  The cygwin environment as above with MinGW headers and libraries 
installed in the cygwin environment.  Then using the gcc switch 
mno-cygwin you compile code containing Win32 (but not POSIX) calls 
and generate binaries that do not depend on cygwin.dll.

3.  The cygwin environment as above with the MinGW distribution 
separately installed.  Instead of using cygwin's gcc,  you put the 
MinGW distribution's bin directory on your path ahead of cygwin's.  Then
you use MinGW's compiler (with no mon-cygwin switch of course).  The 
cygwin environment is now only a convenient set of unix command line 

4.  Cygwin is not installed.  MinGW is installed along with the MSys 
command line tools.  This is like 3.,  except that the lighter weight 
MSys tools are used instead of the Cygwin environment.

I have found that people often fail to distinguish these 4 possibilities
and often use misleading terminology.  For instance,  people sometimes
refer to 2.,  3.,  or 4.  as producing "native" executables.  The reason
for this terminology is that the source code only uses native Windows 
calls and not POSIX calls.  Of course,  in either case what's generated
is a native executable.

The situation is particularly confusing because neither the Cygwin nor 
the MinGW web sites have clear information about this.  The MinGW web 
site recommends that Cygwin users use set up 3.,  and  only indirectly 
refers to setup 2. as less desirable.  I don't agree with this advice.  
In my experience,  setup 3. is the most confusing and problematic.  
(However,  both 1. and 4. are relatively straight forward.)

I favor 2. for the following reasons:
A.  With it you can compile either code with POSIX calls (depending on 
cygwin.dll) or code with Win32 calls (not depending on cygwin.dll).
B.  Cygwin has its own emulated file system which can conflict with 
the native way that the MinGW tools deal with files.  The presence of 
MSYS,  a second bash environment forked from the Cygwin base,  further
confuses the issue.
C.  You can use conditionals to create a makefile that works under both 
Linux and Windows to generate Windows executables from either platform 
(using cross compilation under Linux).

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]