Tcl Source Code

Hex Artifact Content
Login

Artifact 1611db415321e912b38c7df0f36d2bb1c53feb86:


0000: 54 63 6c 20 38 2e 36 20 66 6f 72 20 57 69 6e 64  Tcl 8.6 for Wind
0010: 6f 77 73 0a 0a 31 2e 20 49 6e 74 72 6f 64 75 63  ows..1. Introduc
0020: 74 69 6f 6e 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  tion.-----------
0030: 2d 2d 2d 2d 0a 0a 54 68 69 73 20 69 73 20 74 68  ----..This is th
0040: 65 20 64 69 72 65 63 74 6f 72 79 20 77 68 65 72  e directory wher
0050: 65 20 79 6f 75 20 63 6f 6e 66 69 67 75 72 65 20  e you configure 
0060: 61 6e 64 20 63 6f 6d 70 69 6c 65 20 74 68 65 20  and compile the 
0070: 57 69 6e 64 6f 77 73 0a 76 65 72 73 69 6f 6e 20  Windows.version 
0080: 6f 66 20 54 63 6c 2e 20 20 54 68 69 73 20 64 69  of Tcl.  This di
0090: 72 65 63 74 6f 72 79 20 61 6c 73 6f 20 63 6f 6e  rectory also con
00a0: 74 61 69 6e 73 20 73 6f 75 72 63 65 20 66 69 6c  tains source fil
00b0: 65 73 20 66 6f 72 20 54 63 6c 0a 74 68 61 74 20  es for Tcl.that 
00c0: 61 72 65 20 73 70 65 63 69 66 69 63 20 74 6f 20  are specific to 
00d0: 4d 69 63 72 6f 73 6f 66 74 20 57 69 6e 64 6f 77  Microsoft Window
00e0: 73 2e 0a 0a 54 68 65 20 69 6e 66 6f 72 6d 61 74  s...The informat
00f0: 69 6f 6e 20 69 6e 20 74 68 69 73 20 66 69 6c 65  ion in this file
0100: 20 69 73 20 6d 61 69 6e 74 61 69 6e 65 64 20 6f   is maintained o
0110: 6e 20 74 68 65 20 77 65 62 20 61 74 3a 0a 0a 09  n the web at:...
0120: 68 74 74 70 3a 2f 2f 77 77 77 2e 74 63 6c 2e 74  http://www.tcl.t
0130: 6b 2f 64 6f 63 2f 68 6f 77 74 6f 2f 63 6f 6d 70  k/doc/howto/comp
0140: 69 6c 65 2e 68 74 6d 6c 23 77 69 6e 0a 0a 32 2e  ile.html#win..2.
0150: 20 43 6f 6d 70 69 6c 69 6e 67 20 54 63 6c 0a 2d   Compiling Tcl.-
0160: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a  ---------------.
0170: 0a 49 6e 20 6f 72 64 65 72 20 74 6f 20 63 6f 6d  .In order to com
0180: 70 69 6c 65 20 54 63 6c 20 66 6f 72 20 57 69 6e  pile Tcl for Win
0190: 64 6f 77 73 2c 20 79 6f 75 20 6e 65 65 64 20 74  dows, you need t
01a0: 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 3a 0a 0a 09  he following:...
01b0: 54 63 6c 20 38 2e 36 20 53 6f 75 72 63 65 20 44  Tcl 8.6 Source D
01c0: 69 73 74 72 69 62 75 74 69 6f 6e 20 28 70 6c 75  istribution (plu
01d0: 73 20 61 6e 79 20 70 61 74 63 68 65 73 29 0a 0a  s any patches)..
01e0: 09 61 6e 64 0a 0a 09 56 69 73 75 61 6c 20 43 2b  .and...Visual C+
01f0: 2b 20 36 20 6f 72 20 6e 65 77 65 72 0a 0a 09 6f  + 6 or newer...o
0200: 72 0a 0a 09 4c 69 6e 75 78 20 2b 20 4d 69 6e 47  r...Linux + MinG
0210: 57 2d 77 36 34 20 5b 68 74 74 70 3a 2f 2f 6d 69  W-w64 [http://mi
0220: 6e 67 77 2d 77 36 34 2e 73 6f 75 72 63 65 66 6f  ngw-w64.sourcefo
0230: 72 67 65 2e 6e 65 74 2f 5d 0a 09 20 20 20 20 28  rge.net/]..    (
0240: 77 69 6e 33 32 20 6f 72 20 77 69 6e 36 34 29 0a  win32 or win64).
0250: 0a 09 6f 72 0a 0a 09 43 79 67 77 69 6e 20 2b 20  ..or...Cygwin + 
0260: 4d 69 6e 47 57 2d 77 36 34 20 5b 68 74 74 70 3a  MinGW-w64 [http:
0270: 2f 2f 63 79 67 77 69 6e 2e 63 6f 6d 2f 69 6e 73  //cygwin.com/ins
0280: 74 61 6c 6c 2e 68 74 6d 6c 5d 0a 09 20 20 20 20  tall.html]..    
0290: 28 77 69 6e 33 32 20 6f 72 20 77 69 6e 36 34 29  (win32 or win64)
02a0: 0a 0a 09 6f 72 0a 0a 09 44 61 72 77 69 6e 20 2b  ...or...Darwin +
02b0: 20 4d 69 6e 47 57 2d 77 36 34 20 5b 68 74 74 70   MinGW-w64 [http
02c0: 3a 2f 2f 6d 69 6e 67 77 2d 77 36 34 2e 73 6f 75  ://mingw-w64.sou
02d0: 72 63 65 66 6f 72 67 65 2e 6e 65 74 2f 5d 0a 09  rceforge.net/]..
02e0: 20 20 20 20 28 77 69 6e 33 32 20 6f 72 20 77 69      (win32 or wi
02f0: 6e 36 34 29 0a 0a 09 6f 72 0a 0a 09 4d 73 79 73  n64)...or...Msys
0300: 20 2b 20 4d 69 6e 47 57 2d 77 36 34 20 5b 68 74   + MinGW-w64 [ht
0310: 74 70 3a 2f 2f 6d 69 6e 67 77 2d 77 36 34 2e 73  tp://mingw-w64.s
0320: 6f 75 72 63 65 66 6f 72 67 65 2e 6e 65 74 2f 5d  ourceforge.net/]
0330: 0a 09 20 20 20 20 28 77 69 6e 33 32 20 6f 72 20  ..    (win32 or 
0340: 77 69 6e 36 34 29 0a 0a 09 6f 72 0a 0a 09 4d 73  win64)...or...Ms
0350: 79 73 20 2b 20 4d 69 6e 47 57 20 5b 68 74 74 70  ys + MinGW [http
0360: 3a 2f 2f 77 77 77 2e 6d 69 6e 67 77 2e 6f 72 67  ://www.mingw.org
0370: 2f 64 6f 77 6e 6c 6f 61 64 2e 73 68 74 6d 6c 5d  /download.shtml]
0380: 0a 09 20 20 20 20 28 77 69 6e 33 32 20 6f 6e 6c  ..    (win32 onl
0390: 79 29 0a 0a 0a 49 6e 20 70 72 61 63 74 69 63 65  y)...In practice
03a0: 2c 20 74 68 69 73 20 72 65 6c 65 61 73 65 20 69  , this release i
03b0: 73 20 62 75 69 6c 74 20 77 69 74 68 20 56 69 73  s built with Vis
03c0: 75 61 6c 20 43 2b 2b 20 36 2e 30 20 61 6e 64 20  ual C++ 6.0 and 
03d0: 74 68 65 20 54 45 41 0a 4d 61 6b 65 66 69 6c 65  the TEA.Makefile
03e0: 2e 0a 0a 49 66 20 79 6f 75 20 61 72 65 20 62 75  ...If you are bu
03f0: 69 6c 64 69 6e 67 20 77 69 74 68 20 56 69 73 75  ilding with Visu
0400: 61 6c 20 43 2b 2b 2c 20 69 6e 20 74 68 65 20 22  al C++, in the "
0410: 77 69 6e 22 20 73 75 62 64 69 72 65 63 74 6f 72  win" subdirector
0420: 79 20 6f 66 20 74 68 65 0a 73 6f 75 72 63 65 20  y of the.source 
0430: 72 65 6c 65 61 73 65 2c 20 79 6f 75 20 77 69 6c  release, you wil
0440: 6c 20 66 69 6e 64 20 22 6d 61 6b 65 66 69 6c 65  l find "makefile
0450: 2e 76 63 22 2e 20 20 54 68 69 73 20 69 73 20 74  .vc".  This is t
0460: 68 65 20 6d 61 6b 65 66 69 6c 65 20 66 6f 72 20  he makefile for 
0470: 74 68 65 0a 56 69 73 75 61 6c 20 43 2b 2b 20 63  the.Visual C++ c
0480: 6f 6d 70 69 6c 65 72 20 61 6e 64 20 75 73 65 73  ompiler and uses
0490: 20 74 68 65 20 73 74 6f 63 6b 20 4e 4d 41 4b 45   the stock NMAKE
04a0: 20 74 6f 6f 6c 2e 20 20 44 65 74 61 69 6c 65 64   tool.  Detailed
04b0: 20 64 69 72 65 63 74 69 6f 6e 73 20 66 6f 72 0a   directions for.
04c0: 75 73 69 6e 67 20 69 74 2c 20 61 72 65 20 69 6e  using it, are in
04d0: 20 74 68 65 20 63 6f 6d 6d 65 6e 74 73 20 6f 66   the comments of
04e0: 20 22 6d 61 6b 65 66 69 6c 65 2e 76 63 22 2e 20   "makefile.vc". 
04f0: 20 41 20 71 75 69 63 6b 20 65 78 61 6d 70 6c 65   A quick example
0500: 20 77 6f 75 6c 64 20 62 65 3a 0a 0a 09 43 3a 5c   would be:...C:\
0510: 74 63 6c 5f 73 6f 75 72 63 65 5c 77 69 6e 5c 3e  tcl_source\win\>
0520: 6e 6d 61 6b 65 20 2d 66 20 6d 61 6b 65 66 69 6c  nmake -f makefil
0530: 65 2e 76 63 0a 0a 54 68 65 72 65 20 69 73 20 61  e.vc..There is a
0540: 6c 73 6f 20 61 20 44 65 76 65 6c 6f 70 65 72 20  lso a Developer 
0550: 53 74 75 64 69 6f 20 77 6f 72 6b 73 70 61 63 65  Studio workspace
0560: 20 61 6e 64 20 70 72 6f 6a 65 63 74 20 66 69 6c   and project fil
0570: 65 2c 20 74 6f 6f 2c 20 69 66 20 79 6f 75 0a 77  e, too, if you.w
0580: 6f 75 6c 64 20 6c 69 6b 65 20 74 6f 20 75 73 65  ould like to use
0590: 20 74 68 65 6d 2e 0a 0a 49 66 20 79 6f 75 20 61   them...If you a
05a0: 72 65 20 62 75 69 6c 64 69 6e 67 20 77 69 74 68  re building with
05b0: 20 4c 69 6e 75 78 2c 20 43 79 67 77 69 6e 20 6f   Linux, Cygwin o
05c0: 72 20 4d 73 79 73 2c 20 79 6f 75 20 63 61 6e 20  r Msys, you can 
05d0: 75 73 65 20 74 68 65 20 63 6f 6e 66 69 67 75 72  use the configur
05e0: 65 0a 73 63 72 69 70 74 20 74 68 61 74 20 6c 69  e.script that li
05f0: 76 65 73 20 69 6e 20 74 68 65 20 77 69 6e 20 73  ves in the win s
0600: 75 62 64 69 72 65 63 74 6f 72 79 2e 20 54 68 65  ubdirectory. The
0610: 20 4c 69 6e 75 78 2f 43 79 67 77 69 6e 2f 4d 73   Linux/Cygwin/Ms
0620: 79 73 20 62 61 73 65 64 0a 63 6f 6e 66 69 67 75  ys based.configu
0630: 72 65 2f 62 75 69 6c 64 20 70 72 6f 63 65 73 73  re/build process
0640: 20 77 6f 72 6b 73 20 6a 75 73 74 20 6c 69 6b 65   works just like
0650: 20 74 68 65 20 55 4e 49 58 20 6f 6e 65 2c 20 73   the UNIX one, s
0660: 6f 20 79 6f 75 20 77 69 6c 6c 20 77 61 6e 74 0a  o you will want.
0670: 74 6f 20 72 65 66 65 72 20 74 6f 20 2e 2e 2f 75  to refer to ../u
0680: 6e 69 78 2f 52 45 41 44 4d 45 20 66 6f 72 20 61  nix/README for a
0690: 76 61 69 6c 61 62 6c 65 20 63 6f 6e 66 69 67 75  vailable configu
06a0: 72 65 20 6f 70 74 69 6f 6e 73 2e 0a 0a 49 66 20  re options...If 
06b0: 79 6f 75 20 77 61 6e 74 20 36 34 2d 62 69 74 20  you want 64-bit 
06c0: 65 78 65 63 75 74 61 62 6c 65 73 20 28 78 38 36  executables (x86
06d0: 5f 36 34 29 2c 20 79 6f 75 20 6e 65 65 64 20 74  _64), you need t
06e0: 6f 20 63 6f 6e 66 69 67 75 72 65 20 75 73 69 6e  o configure usin
06f0: 67 0a 74 68 65 20 2d 2d 65 6e 61 62 6c 65 2d 36  g.the --enable-6
0700: 34 62 69 74 20 6f 70 74 69 6f 6e 2e 20 4d 61 6b  4bit option. Mak
0710: 65 20 73 75 72 65 20 74 68 61 74 20 74 68 65 20  e sure that the 
0720: 78 38 36 5f 36 34 2d 77 36 34 2d 6d 69 6e 67 77  x86_64-w64-mingw
0730: 33 32 0a 63 6f 6d 70 69 6c 65 72 20 69 73 20 70  32.compiler is p
0740: 72 65 73 65 6e 74 2e 20 46 6f 72 20 43 79 67 77  resent. For Cygw
0750: 69 6e 20 74 68 69 73 20 63 6f 6d 70 69 6c 65 72  in this compiler
0760: 20 63 61 6e 20 62 65 20 66 6f 75 6e 64 20 69 6e   can be found in
0770: 20 74 68 65 0a 22 6d 69 6e 67 77 36 34 2d 78 38   the."mingw64-x8
0780: 36 5f 36 34 2d 67 63 63 2d 63 6f 72 65 22 20 70  6_64-gcc-core" p
0790: 61 63 6b 61 67 65 2c 20 77 68 69 63 68 20 63 61  ackage, which ca
07a0: 6e 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 20 74  n be installed t
07b0: 68 72 6f 75 67 68 0a 74 68 65 20 6e 6f 72 6d 61  hrough.the norma
07c0: 6c 20 43 79 67 77 69 6e 20 69 6e 73 74 61 6c 6c  l Cygwin install
07d0: 20 70 72 6f 63 65 73 73 2e 20 49 66 20 79 6f 75   process. If you
07e0: 20 6f 6e 6c 79 20 77 61 6e 74 20 33 32 2d 62 69   only want 32-bi
07f0: 74 20 65 78 65 63 75 74 61 62 6c 65 73 2c 0a 74  t executables,.t
0800: 68 65 20 22 6d 69 6e 67 77 36 34 2d 69 36 38 36  he "mingw64-i686
0810: 2d 67 63 63 2d 63 6f 72 65 22 20 70 61 63 6b 61  -gcc-core" packa
0820: 67 65 20 69 73 20 77 68 61 74 20 79 6f 75 20 6e  ge is what you n
0830: 65 65 64 2e 20 46 6f 72 20 4c 69 6e 75 78 2c 20  eed. For Linux, 
0840: 44 61 72 77 69 6e 0a 61 6e 64 20 4d 73 79 73 2c  Darwin.and Msys,
0850: 20 79 6f 75 20 63 61 6e 20 64 6f 77 6e 6c 6f 61   you can downloa
0860: 64 20 61 20 73 75 69 74 61 62 6c 65 20 77 69 6e  d a suitable win
0870: 33 32 20 6f 72 20 77 69 6e 36 34 20 63 6f 6d 70  32 or win64 comp
0880: 69 6c 65 72 20 66 72 6f 6d 0a 5b 68 74 74 70 73  iler from.[https
0890: 3a 2f 2f 73 6f 75 72 63 65 66 6f 72 67 65 2e 6e  ://sourceforge.n
08a0: 65 74 2f 70 72 6f 6a 65 63 74 73 2f 6d 69 6e 67  et/projects/ming
08b0: 77 2d 77 36 34 2f 66 69 6c 65 73 2f 5d 0a 0a 55  w-w64/files/]..U
08c0: 73 65 20 74 68 65 20 4d 61 6b 65 66 69 6c 65 20  se the Makefile 
08d0: 22 69 6e 73 74 61 6c 6c 22 20 74 61 72 67 65 74  "install" target
08e0: 20 74 6f 20 69 6e 73 74 61 6c 6c 20 54 63 6c 2e   to install Tcl.
08f0: 20 20 49 74 20 77 69 6c 6c 20 69 6e 73 74 61 6c    It will instal
0900: 6c 20 69 74 0a 61 63 63 6f 72 64 69 6e 67 20 74  l it.according t
0910: 6f 20 74 68 65 20 70 72 65 66 69 78 20 6f 70 74  o the prefix opt
0920: 69 6f 6e 73 20 79 6f 75 20 70 72 6f 76 69 64 65  ions you provide
0930: 64 20 69 6e 20 74 68 65 20 63 6f 72 72 65 63 74  d in the correct
0940: 20 64 69 72 65 63 74 6f 72 79 0a 73 74 72 75 63   directory.struc
0950: 74 75 72 65 2e 0a 0a 4e 6f 74 65 20 74 68 61 74  ture...Note that
0960: 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 72 75 6e   in order to run
0970: 20 74 63 6c 73 68 38 35 2e 65 78 65 2c 20 79 6f   tclsh85.exe, yo
0980: 75 20 6d 75 73 74 20 65 6e 73 75 72 65 20 74 68  u must ensure th
0990: 61 74 20 74 63 6c 38 35 2e 64 6c 6c 20 69 73 0a  at tcl85.dll is.
09a0: 6f 6e 20 79 6f 75 72 20 70 61 74 68 2c 20 69 6e  on your path, in
09b0: 20 74 68 65 20 73 79 73 74 65 6d 20 64 69 72 65   the system dire
09c0: 63 74 6f 72 79 2c 20 6f 72 20 69 6e 20 74 68 65  ctory, or in the
09d0: 20 64 69 72 65 63 74 6f 72 79 20 63 6f 6e 74 61   directory conta
09e0: 69 6e 69 6e 67 0a 74 63 6c 73 68 38 36 2e 65 78  ining.tclsh86.ex
09f0: 65 2e 0a 0a 4e 6f 74 65 3a 20 54 63 6c 20 6e 6f  e...Note: Tcl no
0a00: 20 6c 6f 6e 67 65 72 20 70 72 6f 76 69 64 65 73   longer provides
0a10: 20 73 75 70 70 6f 72 74 20 66 6f 72 20 57 69 6e   support for Win
0a20: 33 32 73 2e 0a 0a 33 2e 20 54 65 73 74 20 73 75  32s...3. Test su
0a30: 69 74 65 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ite.------------
0a40: 2d 0a 0a 54 68 69 73 20 64 69 73 74 72 69 62 75  -..This distribu
0a50: 74 69 6f 6e 20 63 6f 6e 74 61 69 6e 73 20 61 6e  tion contains an
0a60: 20 65 78 74 65 6e 73 69 76 65 20 74 65 73 74 20   extensive test 
0a70: 73 75 69 74 65 20 66 6f 72 20 54 63 6c 2e 20 20  suite for Tcl.  
0a80: 53 6f 6d 65 20 6f 66 20 74 68 65 0a 74 65 73 74  Some of the.test
0a90: 73 20 61 72 65 20 74 69 6d 69 6e 67 20 64 65 70  s are timing dep
0aa0: 65 6e 64 65 6e 74 20 61 6e 64 20 77 69 6c 6c 20  endent and will 
0ab0: 66 61 69 6c 20 66 72 6f 6d 20 74 69 6d 65 20 74  fail from time t
0ac0: 6f 20 74 69 6d 65 2e 20 20 49 66 20 61 20 74 65  o time.  If a te
0ad0: 73 74 20 69 73 0a 66 61 69 6c 69 6e 67 20 63 6f  st is.failing co
0ae0: 6e 73 69 73 74 65 6e 74 6c 79 2c 20 70 6c 65 61  nsistently, plea
0af0: 73 65 20 73 65 6e 64 20 75 73 20 61 20 62 75 67  se send us a bug
0b00: 20 72 65 70 6f 72 74 20 77 69 74 68 20 61 73 20   report with as 
0b10: 6d 75 63 68 20 64 65 74 61 69 6c 20 61 73 0a 79  much detail as.y
0b20: 6f 75 20 63 61 6e 20 6d 61 6e 61 67 65 20 74 6f  ou can manage to
0b30: 20 6f 75 72 20 74 72 61 63 6b 65 72 3a 0a 0a 09   our tracker:...
0b40: 68 74 74 70 3a 2f 2f 63 6f 72 65 2e 74 63 6c 2e  http://core.tcl.
0b50: 74 6b 2f 74 63 6c 2f 72 65 70 6f 72 74 6c 69 73  tk/tcl/reportlis
0b60: 74 0a 0a 49 6e 20 6f 72 64 65 72 20 74 6f 20 72  t..In order to r
0b70: 75 6e 20 74 68 65 20 74 65 73 74 20 73 75 69 74  un the test suit
0b80: 65 2c 20 79 6f 75 20 62 75 69 6c 64 20 74 68 65  e, you build the
0b90: 20 22 74 65 73 74 22 20 74 61 72 67 65 74 20 75   "test" target u
0ba0: 73 69 6e 67 20 74 68 65 0a 61 70 70 72 6f 70 72  sing the.appropr
0bb0: 69 61 74 65 20 6d 61 6b 65 66 69 6c 65 20 66 6f  iate makefile fo
0bc0: 72 20 79 6f 75 72 20 63 6f 6d 70 69 6c 65 72 2e  r your compiler.
0bd0: 0a                                               .