Topic: MinGW directory tree

If I want to make use of parts of MinGW from outside SF, using the MinGW version as put there by SF, which part of it should I point my system at, please?   I ask because I note that SF installs it with a kind of recursive structure, like this:

   SF
    |
    |
    |
    ----MinGW-w64
                 |
                 |
                 |
      -------------------------------------------
      |       |           |                               |
      |       |           |                               |
    bin     lib     MinGW           x86_64-w64-MinGW32
                           |                               |
                           |                               |
              --------------------------             |
              |       |           |          |            |
              |       |           |          |            |
            bin     lib                                  |
                                                           |
                                                           |
                                              --------------------------
                                              |       |           |          |
                                              |       |           |          |
                                              |       |           |          |
                                             bin     lib


As far as I can see, all three of the boldface 'bin' subdirirectories contain many of the same binary executables, like gcc.exe, gfortran.exe, ar.exe and so forth.   I can't be sure but they look as if they are identical.

Is it possible to treat any part of the above as an installed MinGW directory tree?  If so, where in the above should we identify as the top of the basic MinGW tree, please? 

This would obviate the need to install another copy of MinGW somewhere else, if we wanted MinGW for other reasons, and it could be done without interfering with SF in any way.  If this turns out to be a very bad idea, that's fine, and I can install my own copy of MinGW elsewhere.  I'd just like to know!
---
John

Re: MinGW directory tree

I think I can answer this myself.
MinGW as installed by SF appears to be precisely tailored to the needs of SF and best not used for other purposes.

The version of MinGW I think looks the most promising for other purposes - to be installed somewhere ELSE, not mixed with MinGW under SF, is TDM-GCC.
---
J.

Re: MinGW directory tree

John,

Simply Fortran installs only the compiler (and binary utilities, binutils) portion of MinGW, so if you're expecting to find the full suite of UNIX-like tools, you will be disappointed.  We don't include, for example, bash or any of the common archiving and compression tools.

The directory structure, however, is what one would expect when installing a pure MinGW distribution.  Generally speaking, you should only ever use the executables located in the mingw-w64/bin directory.  The two other trees containing bin directories are both needed and expected to be present by the compiler.  It will need to call certain executables in both.  The fact that there are two directory trees, mingw and x86_64-w64-mingw32, is due to some oddities with the Windows port of the GNU compilers themselves.

The reason the tree seems so "customized" to Simply Fortran is because Simply Fortran is seeking to isolate the difficulties of installing, configuring, and using the GNU compilers from the user.

Jeff Armstrong
Approximatrix, LLC

Re: MinGW directory tree

I should also point out that we're not using "MinGW's compiler" per se.  Approximatrix builds its own distribution of compilers; it is not using another party's binaries.

Jeff Armstrong
Approximatrix, LLC

Re: MinGW directory tree

jeff wrote:

Simply Fortran is seeking to isolate the difficulties of installing, configuring, and using the GNU compilers from the user.

Thanks for explaining about MinGW but I do very much agree with strategy for SF!  It is most exceedingly helpful to be able to rely on SF completely, to install everything in one go as it does, and not ever to have to worry about whether the correct version of MinGW is correctly installed, GFortran is in the right place, 32-bit and 64-bit components are correctly placed and called up, and all the other executables are correctly picked out when setting up SF.
---
John

Re: MinGW directory tree

I also need to use a different version of the compiler and a mingw installation that is installed separately from Simply Fortran.

I have posted elsewhere about getting these two mingw installs to "play nice" together. As the compiler builds are different (even for the same gfortran versions) you can get errors when compiling.

I have modified my practices a little bit since that post; I have a changed the link I use to run the SF gui so that it sets up a local PATH environment to what it needs to run. I only add my other mingw install to the user's PATH variable. If I want to compile using the SF compiler from the command line (rarely) I use the scripts discussed in the other post.

HTH.

--
David