Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
diana:windows:building:environment [2010-01-18 17:31:34]
dages
diana:windows:building:environment [2022-05-31 09:29:31] (current)
Line 3: Line 3:
 Assuming Windows XP 32.  We will use MinGW to build the libraries and application and MSYS as a working environment. Assuming Windows XP 32.  We will use MinGW to build the libraries and application and MSYS as a working environment.
  
-The distinction between MinGW and MSYS is very important: MinGW is a set of compilers and libraries you use to build Windows applications, while MSYS is GNU environment similar to (and, in fact, based on) Cygwin.  You can //not// use MSYS libraries in your Windows application.+The distinction between MinGW and MSYS is very important: MinGW is a set of compilers and libraries you use to build Windows applications, while MSYS is an emulated GNU environment similar to (and, in fact, based on) Cygwin.  You can //not// use MSYS libraries in your Windows application.  This means that you will sometimes have two copies of a particular library: an MSYS version used by MSYS tools, and a native version built with MinGW and used by MinGW tools and / or your application. 
 + 
 +===== Directories ===== 
 + 
 +We will install MinGW into ''C:\MinGW'' and MSYS into ''C:\MSYS''
 + 
 +MSYS maps Unix-like paths to Windows paths: ''/'' translates to ''C:\MSYS'' and ''/mingw'' translates to ''C:\MinGW'' In addition, all Windows drives will show up as ''/x'', where ''x'' corresponds to the drive letter, so ''/c/windows'' translates to ''C:\windows'', etc. 
 + 
 +We will install our libraries and applications into ''C:\met.no'' You should start by creating that directory and the required subdirectories: 
 + 
 +  C:\> mkdir met.no 
 +  C:\> mkdir met.no\bin 
 +  C:\> mkdir met.no\include 
 +  C:\> mkdir met.no\lib 
 +  C:\> mkdir met.no\share 
 +  C:\> mkdir met.no\copyright
  
 ===== Subversion ===== ===== Subversion =====
Line 18: Line 33:
  
 At this point, you may want to download bsdtar from http://sourceforge.net/projects/mingw/files/MinGW%20Utilities/basic%20bsdtar/bsdtar-2.7.900a_r1628-20091110/ and install ''bsdtar.exe'' as ''/mingw/bin/tar'' It supports a wider range of archive formats and compression algorithms than GNU tar, and automatically detects which one to use. At this point, you may want to download bsdtar from http://sourceforge.net/projects/mingw/files/MinGW%20Utilities/basic%20bsdtar/bsdtar-2.7.900a_r1628-20091110/ and install ''bsdtar.exe'' as ''/mingw/bin/tar'' It supports a wider range of archive formats and compression algorithms than GNU tar, and automatically detects which one to use.
 +
 +You may want to install InfoZip's ''zip'' utility as well, since ''bsdtar'' can //extract// zip files but not //create// them: download the source code from http://sourceforge.net/projects/infozip/files/, extract it, and run the following commands in the source directory:
 +
 +  $ make -f win32/makefile.gcc
 +  $ cp zip.exe /mingw/bin
  
 ===== MSYS ===== ===== MSYS =====
Line 77: Line 97:
   $ cat >hello.f   $ cat >hello.f
         PROGRAM HELLOW         PROGRAM HELLOW
-        WRITE(UNIT=*, FMT=*) 'Hello World'+        WRITE(UNIT=*, FMT=*) 'Hello, Fortran world!'
         END         END
   ^D   ^D
Line 93: Line 113:
   * the ''bin'' and ''lib'' zipfiles for the latest flex release   * the ''bin'' and ''lib'' zipfiles for the latest flex release
  
-Unpack these zipfiles into ''C:\MinGW''.+For some unfathomable reason, both the flex and bison ''lib'' zipfiles contain incorrect copies of ''<unistd.h>'' Either make a backup copy of ''/MinGW/include/unistd.h'' before you unpack them, or tell ''unzip'' (or ''bsdtar'') not to overwrite existing files: 
 + 
 +  $ tar -kxf bison-2.4.1-lib.zip -C /MinGW 
 + 
 +This will install a shell script called ''/MinGW/bin/yacc'' which incorrectly redirects to ''c:/progra~1/bison/bin/bison'' Edit it so the entire script looks like this: 
 + 
 +  #! /bin/sh 
 +  exec /mingw/bin/bison -y "$@"
  
 ===== WiX ===== ===== WiX =====
  • diana/windows/building/environment.1263835894.txt.gz
  • Last modified: 2022-05-31 09:23:14
  • (external edit)