Search This Blog

Thursday, April 04, 2013

SWI-Prolog for MS-Windows


SWI-Prolog for MS-Windows
Jan Wielemaker
VU University Amsterdam
University of Amsterdam
The Netherlands
E-mail: jan@swi-prolog.org
Abstract
This document gets you started using SWI-Prolog on MS-Windows. It also describes the components and issues that are specific to MS-Windows. It is by no means a manual or Prolog tutorial. The reference manual is available online or can be downloaded in HTML and PDF format from the SWI-Prolog website, which also provides links to books, online tutorials and other Prolog-related material.

Table of Contents

1 Using SWI-Prolog

1.1 Starting Prolog and loading a program

The SWI-Prolog executable swipl-win.exe can be started from the StartMenu or by opening a .pl file holding Prolog program text from the Windows explorer.1 The installation folder (by default C:\Program Files\swipl) contains a subfolder demo with the file likes.pl. This file can be opened in Prolog from the StartMenu, by opening likes.pl in the Windows explorer or by using the following command in the Prolog application. Be sure to get the quotes right and terminate the command with a full-stop (.).
?- [swi('demo/likes')].
If Prolog is started from the start menu it is passed the option --win_app, which causes it to start in the local equivalent of MyDocuments\Prolog. This folder is created if it does not exist.

1.2 Executing a query

After loading a program, one can ask Prolog queries about the program. The query below asks Prolog what food `sam' likes. The system responds with X = <value> if it can prove the goal for a certain X. The user can type the semi-colon (;) or spacebar. If you want another solution. Use the return key if you do not want to see the more answers. Prolog completes the output a full stop (.) if the user uses the return key or Prolog knowns there are no more answers. If Prolog cannot find (more) answers, it writes false. Finally, Prolog can answer using an error message to indicate the query or program contains an error.
?- likes(sam, X).
X = dahl ;
X = tandoori ;
...
X = chips.

?-
Note that the answer written by Prolog is a valid Prolog program that, when executed, produces the same set of answers as the original program.

1.3 Menu commands

The SWI-Prolog console provided by swipl-win.exe has a menu for accessing the most commonly used commands. We assume not all menu entries need to be explained in details. We make some exceptions:
File/Reload modified files
This menu reloads all loaded source files that have been modified using the make/0 command described in section 1.5.
File/Navigator ...
Opens an explorer-like view on Prolog files and the predicates they contain.
Settings/Font ...
Allows for changing the font of the console. On some installations the default font gives redraw and cursor dislocation problems. In this case you may wish to select an alternative. Some built-in commands assume non-proportional fonts.
Settings/User init file ...
Edits the user personalisation file. If no such file exists, it first installs a default file as pl.ini that contains commonly used settings in comments.
Settings/Stack sizes ...
Allows for defining the maximum size to which the various Prolog stacks are allowed to grow. The system defaults are chosen to make erroneous programs fail quickly on modest hardware. Programs with large data structures or many choice-points often need larger stacks. Note that an active Prolog process growing over the size of the physical memory of your computer can make the system extremely slow.
Run/Interrupt
Try to interrupt the running Prolog process. This is the same as using Control-C. Sometimes interrupts are not honoured or take very long to process. Closing the window twice provides a way to force Prolog to stop.
Run/New thread
Creates a new interactor window running in a separate thread of execution. This may be used to inspect the database or program while the main task continues.
Debug/Edit spy points ...
Edit break-points on predicates. From the PceEmacs editor (see section 1.4) break-points can also be set on specific calls from specific clauses.
Debug/Graphical debugger ...
Use the source-level debugger on the next spy- or break-point or other call that enables the debugger.
Help
The help menu provides various starting points to related documents. Items flagged with (on www) open your default internet browser on a page of the SWI-Prolog website.

1.4 Editing Prolog programs

There are three options for editing. One is to run an editor of choice in a separate window and use the make/0 command described below to reload modified files. In addition to this option Prolog can be used to locate predicates, modules and loaded files by specifying the editor of choice for use with the edit/1 command, described below. This is achieved by editing the personalisation file (see section 1.3) and following the instructions in the comments.
The default editor is built-in editor called PceEmacs. This editor provides colourisation support based on real-time parsing and cross-reference analysis of the program.
Other options for editing include GNU-Emacs, SWI-Prolog-Editor and the Eclipse-based PDT environment. See http://www.swi-prolog.org/IDE.html for an up-to-date overview.

1.5 Some useful commands

This section provides a very brief overview of important or commonly used SWI-Prolog predicates to control the environment.
consult(:File)
Load a source file. On Windows, folders may be specified with the DOS/Windows \, which must be escaped, or by using the POSIX standard /. Especially when used in source code, / is to be preferred as it is portable. A Prolog list ([ ... ]) can be used to abbreviate the consult command. The file extension (.pl as well as the selected alternative) can be omitted. Here are some examples:
?- consult(likes).Load likes.pl from the current folder (see pwd/0).
?- ['C:/Program Files/pl/demo/likes']Load likes.pl using absolute path.
?- ['C:\\Program Files\\pl\\demo\\likes']Same using Windows-style path name
pwd
Print working directory (folder).
ls
List files in current directory.
edit
If Prolog is started by opening a .pl file in the explorer, edit this file. Also available from the menu.
edit(+Spec)
Edit file, predicate, module, etc., with the given name. If multiple items are named Spec it prompts for the desired alternative.
make
Reload all files that have been changed since they were last loaded. Normally used after editing one or more files.
gtrace
Start the graphical debugger. There are three ways to use this. Entered as a single goal at the top-level, the next query will be traced. Alternatively it can be used in conjunction with the goal to be debugged: ?- gtrace, run. and finally you can include it in your program to start tracing at a particular point or under a particular condition:
        ...,
        (var(X) -> gtrace ; true),
        ...,
trace
Same as gtrace, but text-based on the console.
apropos(+Keyword)
Search for all predicates that contain Keyword in their name or short description. If a GUI environment is available the results are hyperlinks. Otherwise use help/1 to get details on selected hits.
help(+Spec)
Give help on Spec, which is normally the name of a predicate or C interface function.

2 Using SWI-Prolog with C/C++

Using MinGW or a compiler with a compatible calling format you can write C or C++ code that can be loaded into SWI-Prolog and called as a predicate. You can also embed SWI-Prolog in C/C++ applications.
Details on how to interact with Prolog are in the SWI-Prolog reference manual. The mailing list archives and TWiki web provide problems and solutions to the many problems that may occur. Documentation of the SWI-cpp.h C++ include file is available from the package documentation. This section only discusses some Windows-specific issues.

2.1 Using MSVC

Because the current versions of SWI-Prolog are compiled and linked with MinGW, we are unsure about the status with regard to compiling extensions using MSVC and embedding SWI-Prolog into MSVC projects. Please send your comments to the SWI-Prolog mailinglist, and/or mailto:bugs@swi-prolog.org.
First of all, add the include folder of the installation to the search path for headers and the lib folder to the search path for libraries. Both DLLs (extensions) or embedded executables should link to libswipl.dll.a and, if appropriate, to the multi-threaded DLL version of the MSVC runtime library.
To create extensions, create a Win32 DLL. To embed Prolog, care should be taken that Prolog can find the Prolog installation. For development, the simplest way to ensure this is by adding the installation bin folder to the %PATH% environment and calling PL_initialise() as illustrated below. PL_initialise() uses the path of the loaded libswipl.dll module to find the Prolog installation folder.2
  { static char *av[] = { "libswipl.dll", NULL };

    if ( !PL_initialise(1, av) )
    { 
    }
  }
To create an executable that does not rely on Prolog one must create a saved state of the required Prolog code and attach this to the executable. Creating saved states is described with qsave_program/2 in the reference manual. This can be attached to a state using the DOS command below to create final.exe from the executable produced by MSVC and the generated saved state.
> copy /b file.exe+file.state final.exe

2.2 Using swipl-ld.exe

The swipl-ld.exe automates most of the above complications and provides compatibility for common tasks on many platforms supported by SWI-Prolog. To use it with MinGW, set the PATH environment variables to include the SWI-Prolog binary folder as well as the MinGW binary folders (typically C:\MinGW\bin) to find gcc. An extension myext.dll can be created from the source myext.c using the command below. Add -v to see what commands are executed by swipl-ld.exe.
> swipl-ld.exe -shared -o myext myext.c
An embedded executable is created from C, C++ and Prolog files using
> swipl-ld.exe -o myexe file.c ... file.pl ...

3 The installation

3.1 Supported Windows versions

SWI-Prolog requiring Windows XP or later (XP, Vista, Windows-7). The download site of SWI-Prolog contains older binaries that run on older versions of Windows. We provide both 32-bit and 64-bit installers.

3.2 Choosing the file extension

By default, Prolog uses the .pl extension to indicate Prolog source files. Unfortunately this extension conflicts with the Perl language. If you want to use both on the same Windows machine SWI-Prolog allows you to choose a different extension during the installation. The extension .pro is a commonly used alternative. If portability is an issue, it is advised to use the alternative extension only for the load file, the source file that loads the entire program, and use the normal .pl extension for libraries and files loaded from other files.

3.3 Installed programs

The table below lists the installed components. Some components are marked (32-bits) or (64-bits). Most of this is because the 64-bits version is built using more recent tools and from more recent versions of required libraries using different naming conventions. This will probably be synchronised in the future.
Programs
bin\swipl-win.exe Default Windows application for interactive use.
bin\swipl.exe Console-based version for scripting purposes.
Utilities
bin\swipl-ld.exe Linker front-end to make single-file mixed Prolog/C/C++ executables.
bin\plrc.exe Manipulate Prolog resource files.
Important directories
bin Executables and DLL files
library Prolog library
boot Sources for system predicates
include C/C++ header files for embedding or to create extensions
xpce XPCE graphics system
xpce\prolog\lib XPCE/Prolog library
DLLs and other supporting files
boot32.prc Initial Prolog state (32-bits)
boot64.prc Initial Prolog state (64-bits)
\bin\libswipl.dll The Prolog kernel
\bin\plterm.dll The window for swipl-win.exe
\bin\pthreadVC2.dllPOSIX thread runtime library (64-bits)
Extension DLLs (plugins)
\bin\cgi.dll Gather CGI GET and POST arguments
\bin\double_metaphone.dll Soundex (sounds similar)
\bin\memfile.dll In-memory temporary `files'
\bin\odbc4pl.dll ODBC interface
\bin\plregtry.dll Windows registry interface
\bin\porter_stem.dll Porter stemming implementation
\bin\random.dll Portable random number generator
\bin\rdf_db.dll RDF database
\bin\readutil.dll Fast reading utility
\bin\sgml2pl.dll SGML/XML parser
\bin\socket.dll Prolog socket interface
\bin\table.dll Access structured files as tables
\bin\time.dll Timing and alarm library
\bin\xpce2pl.dll The XPCE graphics system
\bin\zlib1.dll Compression library (32-bit)
\bin\zlibwapi.dll Compression library (64-bit)
\bin\zlib4pl.dll Compression library interface

3.4 Installed Registry keys and menus

The filetype .pl or chosen alternative (see section 3.2) is associated to swipl-win.exe. A chosen folder (default SWI-Prolog) is added to the start menu holding shortcuts to Prolog and some related utilities. The following registry keys are in use. The 64-bit version uses Prolog64 instead of Prolog as a key to accommodate installation of both versions on the same machine. Note that opening a .pl file can be associated with one of the installed Prolog versions only.
HKEY_LOCAL_MACHINE\Software\SWI\Prolog
fileExtension Extension used for Prolog files
group Start menu group
home Installation directory
HKEY_CURRENT_USER\Software\SWI\Plwin\Console
Note: thread-windows store the same info in sub-keys
Height Height of window in character units
Width Width of window in character units
X Left edge of window in pixel units
Y Top edge of window in pixel units
SaveLines Number of lines available for scrollback

3.5 Execution level

The installer asks for the admin execution level (Vista and later) to be able to write shortcuts and registry keys.

3.6 Creating a desktop menu item

If you want a desktop entry for SWI-Prolog, right-drag swipl-win.exe to the desktop and select `Create shortcut'. Then edit the properties and add --win_app to the commandline to make the application start in MyDocuments\Prolog.

4 The SWI-Prolog community and foundation

4.1 Web-site and mailing lists

The SWI-Prolog website is located at http://www.swi-prolog.org/.

4.2 About license conditions

The SWI-Prolog license allows it to be used in a wide variety of environments, including closed-source commercial applications. In practice, redistribution and embedding is allowed, as long as modifications to the SWI-Prolog source are published following the Free Software rules.
The SWI-Prolog kernel and foreign libraries are licensed under the Lesser General Public License (LGPL). The Prolog files are licensed under the normal General Public License GPL with an additional statement that allows for embedding in proprietary software:
As a special exception, if you link this library with other files, compiled with a Free Software compiler, to produce an executable, this library does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not, however, invalidate any other reasons why the executable file might be covered by the GNU General Public License.
This exception is a proven construct used for libgcc, the GNU C-compiler runtime library.

4.3 Supporting SWI-Prolog

There are several ways to support SWI-Prolog:
  • Extend the system with contributions.
  • Improve the system by submitting bug reports and patches.
  • Link to http://www.swi-prolog.org and refer to SWI-Prolog in publications.
  • For commercial users, it may be profitable to sponsor development projects that make SWI-Prolog more useful for you and others. Example projects from the part include adding the initial garbage collector, unbounded integer support, SSL interface, (re-)introduction of the stack-shifter, avoid C-recursion on Prolog datastructures, the PlUnit test environment and the PlDoc documentation environment. Sponsoring development has several benefits: (1) it solves your bottlenecks, (2) others help debugging it and (3) it strengthens SWI-Prolog's position, which gives you better guarantees that the system remains actively developed and makes it easier to find resources and programmers.

Index

?
apropos/1
consult/1
edit/0
edit/1
1.4
gtrace/0
help/1
1.5
ls/0
make/0
1.3 1.4
pwd/0
1.5
qsave_program/2
2.1
trace/0

HOWTO Install the MinGW (GCC) Compiler Suite

Automated Installer

If you are new to MinGW, see the instructions for Getting Started with MinGW to use the automated GUI and command line installers. If you prefer a very manual installation, continue with the instructions on this page.

Manual Installation

As an alternative to the automated installers, you may install MinGW by manually downloading and extracting individual components. Please refer to the release notes for detailed notes, including known issues.
Before proceeding, you are encouraged to also consult the release notes for each individual package; links to these will be found adjacent to each package file entry, on the MinGW Download Page.
Download at least the following (or newer) packages from the MinGW Download Page; where two or more component packages are indicated, you need both / all of them. (Note that the package links provided here refer to current releases at the time of writing; these links may not necessarily be updated immediately when new releases become available.):
These are the minimum requirements for a working MinGW GCC toolchain for C.
Optionally you may want to add any of the following additional languages; (for each which you choose to install, you need both the bin and the dll component packages):
  • gcc-g++ (bin and dll) for C++
  • gcc-objc (bin and dll) for Objective C
  • gcc-gfortran (bin and dll) for Fortran 90/95
  • gcc-java (not yet available) for Java
  • gcc-ada (bin and dll) for Ada
Note that the GCC versions of these files must match the GCC version of the gcc-core installed.
Optionally you may want to add any of the following additional utilities:
You may also want the following additional features:
You will also need a program that can extract .tar.gz and .tar.lzma files, such as 7-Zip or command-line tar, gzip, and lzma tools. A basic standalone tar program bsdtar that includes gz and lzma support is available from the MinGW project.
Create a directory (e.g. C:\MinGW), download all packages to C:\MinGW, extract the files from each package, and add C:\MinGW\bin; to your PATH environment variable using C:\> set PATH=C:\MinGW\bin;%PATH%" (this sets it temporarily, see below to set it permanently).
The whole C:\MinGW subtree is fully relocatable which means there can be several different versions of the MinGW toolchain installed in parallel, e.g. in directories C:\MinGW-3.4.5 and C:\MinGW-4.5.2. Switching between these is merely a matter of renaming directories, assuming C:\MinGW\bin; has been added to the path. You can permanently add C:\MinGW\bin by following the instructions at Environment Settings.
Updating single packages (e.g. when there is a new version of the w32api) can be done by copying the new package to C:\MinGW and unpacking as above to overwrite the older version. This manual update also works with an initial automated install.
Information on other libraries commonly used by Open Source compiled using MinGW is available on the Libraries and Tools page.

Re: HOWTO Install the MinGW (GCC) Compiler Suite

I installed using the process BUT this release is quite old. The gcc.gnu.org page suggests current stable release is 4.4 while the MinGW installer installs 3.4. Also this installer has g77 which is no longer a part of GNU compiler suite, its replaced by fortran95.
Thanks for your kindness for the MinGW compilers suite :)

Re: HOWTO Install the MinGW (GCC) Compiler Suite

Use the MinGW installer to get everything set up in the proper directories. Then if you want version 4.4, download gcc-full-4.4.0-mingw32-bin-2.tar.lzma from the MinGW Sourceforge download page. You can decompress and unarchive using 7za from the 7zip web site. For instance, download the file to the c:\mingw directory, cd to that directory and then type:
   7za x gcc-full-4.4.0-mingw32-bin-2.tar.lzma 

   7za x gcc-full-4.4.0-mingw32-bin-2.tar
This should update your MinGW compiler suite. If you're using msys, there may be some other files you'll want to update as well.

Re: HOWTO Install the MinGW (GCC) Compiler Suite

i have to install MinGW in my windows system.I am using MinGW-5.1.4 and i run the MinGW-5.1.4.Exe,after that i select custom from the dropdown box,and then, l selected g++ compiler,g77 compiler and MinGW Make only.Destination folder like C:\MinGW.This is correct way to install MinGW.Please help me how to install MinGW in the windows.I am using Windows XP.
Regards
Sham

Re: HOWTO Install the MinGW (GCC) Compiler Suite

Download MinGW automated installer from http://sourceforge.net/project/showfiles.php?group_id=2435
Run it and choose options as per needed. It would install everything right. Then add C:\MinGW\bin to you PATH variable.
More detail is available on this web site if you care to search.

Re: HOWTO Install the MinGW (GCC) Compiler Suite

Is there a way to install MinGW with objC garbage collector enabled ?

Re: HOWTO Install the MinGW (GCC) Compiler Suite

MinGW automated installer does not let me select the mirror for downloading files.
This cause very slow in downloading and installing MinGW.
Please update it.

Re: HOWTO Install the MinGW (GCC) Compiler Suite

keith's picture
You can set a preferred mirror in your own SourceForge user preferences. The installer uses whatever you have set there, with SF's automatic mirror selection as fallback. No update is necessary.

Re: HOWTO Install the MinGW (GCC) Compiler Suite

Is there a plan or guide for users who need to install MinGW to the "Program Files" or "AppData" directories? MS is becoming more hard line about installs that reside outside of their standard locations.

Re: HOWTO Install the MinGW (GCC) Compiler Suite

keith's picture
So, Microsoft own your computer, do they?
It isn't their right to tell you how you must deploy your hardware. The canonically correct place to install MinGW is C:\MinGW, but you may move it anywhere else that you prefer, subject to the caveat that you must avoid path names with embedded spaces. If Microsoft tell you they can't allow you to accommodate that, tell them where to get off!

Re: HOWTO Install the MinGW (GCC) Compiler Suite

The MinGW installer is great, both for initial installs and for updates. But would it be possible to add the gdb debugger to the list of things it (optionally) installs/updates? Surely a debugger is a pretty essential component?
Peter

Re: HOWTO Install the MinGW (GCC) Compiler Suite

Is it correct that the MinGW download page link at the start of the Manual Installation instructions given above points to the MinGW Utilities: TclTk download page? Is the TclTk package a pre-requisite of the MinGW Compiler Suite?

Re: HOWTO Install the MinGW (GCC) Compiler Suite

keith's picture
No, and certainly not. I've corrected the reference; thanks for the heads-up.

Re: HOWTO Install the MinGW (GCC) Compiler Suite

Is there a way to install MinGW with objC garbage collector enabled ?
Thanks

Re: HOWTO Install the MinGW (GCC) Compiler Suite

Hi,
I am not able to get these ir entries ,w hat are they supposed to do??
=======================
ren dir dir.binutils
cd ..
..
.cd info
copy dir dir.gcc
copy dir+dir.binutils
========
kindly elaborate!!
Sandeep

Re: HOWTO Install the MinGW (GCC) Compiler Suite

keith's picture
Why? Already asked, and answered. If you opened your eyes, and read the comment immediately below, you would have had no need to ask again! Indeed, it's already elaborated, in the notes following the relevant instruction, within the article itself!

A file is missing.

The copy I got of from this site does not include a file called . Is that file supposed to always be produced by ? I used because that is what I got from <http://gnuwin32.sourceforge.net/packages/tar.htm>. Is that causing the problem? What is that file used for? Is it really important?

Re: A file is missing.

keith's picture
Nope. That file should never be distributed; see my earlier comment to this same article, and this bug report.

Re: HOWTO Install the MinGW (GCC) Compiler Suite

and so
when i compile gcc doesn't create e .exe with the same name but a file called 'a.exe'
Ps
i ve window XP

Re: HOWTO Install the MinGW (GCC) Compiler Suite

keith's picture
This comment is off-topic for this article; please use the mailing list.
For completeness here: this is correct behaviour -- default executable name is a.exe for all compilations. If you want something else, you must say so explicitly, by using the -o exename option, e.g.
gcc -o foo foo.c
will create an executable called foo.exe.

HOWTO Install the MinGW (GCC) Compiler Suite

i ve installed MinGW with Automated (GUI) Installer.
on internet someone says to di this in enviroment setting:
Nome: INCLUDE
Valore: C:\MinGW\include
Nome: LIB
Valore: C:\MinGW\lib
Nome: MINGW
Valore: C:\MinGW
Nome: PATH
Valore: C:\MinGW\bin
is it the truth?

Re: HOWTO Install the MinGW (GCC) Compiler Suite

keith's picture
The last is correct. The first three are unnecessary.

Re: HOWTO Install the MinGW (GCC) Compiler Suite

Require assistance.
0) I installed Mingw-5.1.4 "automatically" to C:\Documents and Settings\ouid\MinGW.
1) For some reason it didn't update my env. variables.
I added "C:\Documents and Settings\ouid\MinGW\bin\" to env.tables
2) I created file a.c with "int main(){}"
3) I try: C:\Documents and Settings\ouid\c>gcc a.c
gcc: installation problem, cannot exec `cc1': No such file or directory
4) I added "C:\Documents and Settings\ouid\MinGW\libexec\gcc\mingw32\3.4.5\" to %PATH%.
5) I try: C:\Documents and Settings\ouid\c>gcc a.c
ld: crt2.o: No such file: No such file or directory
After some googling I found that setting GCC_EXEC_PREFIX to lib/ directory will resolve the issue.
6) I added GCC_EXEC_PREFIX="C:\Documents and Settings\ouid\MinGW\lib\" to env variables
7) I try: C:\Documents and Settings\ouid\c>gcc a.c and it does NOTHING
but freezes up for eternity.
8) Google said that dropping everything from path and using full pathnames like
C:\Documents and Settings\ouid\bin\gcc a.c works. And it's really work. But this is workaround looks too stupid for obvious reasons. Well, creating gcc.bat thal calls C:\Documents and Settings\ouid\bin\mingw32-gcc and putting it in %PATH% works, but this workaround sucks.
What can be done to run gcc from %PATH%ed directory properly?
PS. My os is windows xp.

Re: HOWTO Install the MinGW (GCC) Compiler Suite

keith's picture
Please review the updated version of the instructions. In particular, note the time honoured advice about path names which include spaces; (since you've used such a degenerate installation path, you should uninstall, and then install again, properly).
Also note the section about setting up your environment; you should not need to add anything else, but you must add C:\MinGW\bin to the PATH variable.

Re: HOWTO Install the MinGW (GCC) Compiler Suite

Not sure if this is the right place for this. Attempted to install MinGW for the first time, via the installer (today 27 feb 2009 around 22 GMT), install dir C:\MinGW. Got as far as un-gz'ing / un-tar'ing the g++ tarball:
Extracting gcc-g++-3.4.5-20060117-3.tar.gz
untgz::extract -d 'C:\MinGW' -z 'C:\Users\root\Desktop\gcc-g++-3.4.5-20060117-...
tgz_extract: bad header checksum
Error: Failure reading from tarball.
Downloaded installer again, compared fc /b, same.
Ran again, same error.
Found where it keeps the *.tar.gz, removed offending one to force re-download, same error.
Ran installer from C:\tmp rather than Desktop to force shorter paths, same error.
Ran again with all same options except without g++ this time, installed fine. I think. Not tried yet.
Really seems to be that *g++*.tar.gz then.
--marijke
PS 32-bit Windows Vista Home Plus with the latest service packs, Firefox 3.0.6, on a MAXdata (dual core AMD64, 1G ram, 80G partition with 68G free).

Re: HOWTO Install the MinGW (GCC) Compiler Suite

keith's picture
1) This is not the right place for this sort of discussion; you should use the mailing list, (and you should first search the archives:
http://search.gmane.org/?query=g%2B%2B+download&group=gmane.comp.gnu.mingw.user
and review associated threads (click on an article reference link, then on the `subject' link in the article view)).
2) The problem results from SourceForge themselves having broken the `files' page scripting, (which is common to all their hosted projects), such that it chokes on files with `+' signs, (or possibly explicitly `++'), within the name, and fails to generate a valid download mirror URL. It has been reported:
https://sourceforge.net/tracker/?func=detail&aid=2630791&group_id=1&atid=200001
No fix has yet been forthcoming. Bug SF about it; only they can fix it; we are powerless to resolve it.

Re: HOWTO Install the MinGW (GCC) Compiler Suite

Okay, so i've now read burton's msg of 22 feb and the manual workarounds, in the Getting Started | MinGW wiki (how do you link to another thread?)
So consider this a heads-up that it's still broken. Must put lots of new people off. And i can't say i now understand *what* exactly the error with this one file is...

Re: HOWTO Install the MinGW (GCC) Compiler Suite

do not install MinGW into the same path as MSYS

Re: HOWTO Install the MinGW (GCC) Compiler Suite

I´m missing the gdb installation package from this HOWTO. Actually its missing in the automated installer as well. It would be nice if the automated installer would notify the user what version of the package it will download/install if you choose previous, current or candidate package.

Re: HOWTO Install the MinGW (GCC) Compiler Suite

While the gzip and tar commands are useful, it would be useful to state the directory name explicitly for those like me that choose to manually create the info-dir directories another way. It was not clear whether the directory needed to be named 'dir' or 'info-dir' or 'dir.cc', etc, without crinkling the brow. Thanks for all this, btw...

Re: HOWTO Install the MinGW (GCC) Compiler Suite

keith's picture
In the context of info, `dir' is a file, not a directory (in the file system sense); it is always called `dir', and is found in a directory in the `INFOPATH'. Please see the comment below, which I added in August 2008, concerning the proper way to manage info's `dir' files.

Re: HOWTO Install the MinGW (GCC) Compiler Suite

I propose merging these instructions into the existing instructions on the Getting Started page. I don't see the sense in having automated installation described on the Getting Started page and manual installation described in a HOWTO.

Re: HOWTO Install the MinGW (GCC) Compiler Suite

keith's picture
I can see a practical reason for keeping them segregated.
The `Getting Started' really should be just a `Quick Start' guide, for new users. Such users really don't want to be overwhelmed by too much detail -- they just want to get up and running with a minimum of fuss.
OTOH, more experienced users may appreciate more detailed information. Such users may wish to maintain multiple installations, at different version levels for example, or to incrementally upgrade an existing installation, as newer components are released. (They may wish to do this directly, *without* having to go through the pain of running a nasty wizard style installer, which is really best suited to first time installation only -- ok, that's just my opinion of them, but I'm sure I'm not alone). The detailed information needed to facilitate this doesn't really belong in a `Getting Started' guide; it deserves a more extensive `HOWTO' document.
I'd actually suggest *simplifying* the `Getting Started' page, (to make it a real `Quick Start' guide), and keep this `HOWTO' as a detailed reference. Include a link to here, on the `Getting Started' page, for users wanting more detail, and if necessary merge any content removed from `Getting Started' in here.

Re: HOWTO Install the MinGW (GCC) Compiler Suite

keith's picture
Re the concatenation of info/dir files:
More recent versions of the distributed packages should not even provide the precompiled dir files. These are only useful for users who have an info viewer installed, which basically means those who use MSYS[1].
For those who do use MSYS, you will have both the info viewer, and also the supporting makeinfo and install-info tools; the correct way to build the dir file is to run each of the supplied *.info files through install-info:
cd info;
for file in *.info; do install-info $file dir; done
[1] Yes, I know GnuWin32 also provides an info package; last time I looked, their viewer didn't work. Cygwin also has it, and that works, but uses the dir files installed in the Cygwin tree. It is possible that an alternative native implementation is available elsewhere; if so, it should also provide an install-info tool.