summaryrefslogtreecommitdiffstats
path: root/win/README
diff options
context:
space:
mode:
Diffstat (limited to 'win/README')
-rw-r--r--win/README154
1 files changed, 20 insertions, 134 deletions
diff --git a/win/README b/win/README
index 5a42354..bad9d8f 100644
--- a/win/README
+++ b/win/README
@@ -4,32 +4,19 @@ by Scott Stanton
Scriptics Corporation
scott.stanton@scriptics.com
-RCS: @(#) $Id: README,v 1.10 1999/04/16 00:48:06 stanton Exp $
+RCS: @(#) $Id: README,v 1.11 1999/04/24 01:46:54 stanton Exp $
1. Introduction
---------------
This is the directory where you configure and compile the Windows
version of Tcl. This directory also contains source files for Tcl
-that are specific to Microsoft Windows. The rest of this file
-contains information specific to the Windows version of Tcl.
+that are specific to Microsoft Windows.
-2. Distribution notes
----------------------
+The information in this file is maintained on the web at:
+ http://www.scriptics.com/support/howto/compile.html#win
-Tcl 8.1 for Windows is distributed in binary form in addition to the
-common source release. The binary distribution is a self-extracting
-archive with a built-in installation script.
-
-Look for the binary release in the same location as the source release
-(ftp.scriptics.com:/pub/tcl or any of the mirror sites). For most users,
-the binary release will be much easier to install and use. You only
-need the source release if you plan to modify the core of Tcl, or if
-you need to compile with a different compiler. With the addition of
-the dynamic loading interface, it is no longer necessary to have the
-source distribution in order to build and use extensions.
-
-3. Compiling Tcl
+2. Compiling Tcl
----------------
In order to compile Tcl for Windows, you need the following items:
@@ -38,15 +25,13 @@ In order to compile Tcl for Windows, you need the following items:
Visual C++ 2.x/4.x/5.x
-In practice, the 8.1.a2 release is built with Visual C++ 5.0
+In practice, the 8.1 release is built with Visual C++ 5.0
-In the "win" subdirectory of the source release, you will find two
-files called "makefile.bc" and "makefile.vc". These are the makefiles
-for the Borland and Visual C++ compilers respectively. You should
-copy the appropriate one to "makefile" and update the paths at the
-top of the file to reflect your system configuration. Now you can use
-"make" (or "nmake" for VC++) to build the tcl libraries and the tclsh
-executable.
+In the "win" subdirectory of the source release, you will find
+"makefile.vc". This is the makefile Visual C++ compiler. You should
+update the paths at the top of the file to reflect your system
+configuration. Now you can use "make" (or "nmake" for VC++) to build
+the tcl libraries and the tclsh executable.
In order to use the binaries generated by these makefiles, you will
need to place the Tcl script library files someplace where Tcl can
@@ -69,120 +54,21 @@ directory containing tclsh81.exe.
Note: Tcl no longer provides support for Win32s.
-4. Building Extensions
-----------------------
-
-With the Windows compilers you have to worry about how you export symbols
-from DLLs. tcl.h defines a few macros to help solve this problem:
-EXTERN - all Tcl_ function prototypes use this macro, which implies
- they are exported. You'll see this used in tcl.h and tk.h.
- You should use this in your exported procedures.
- However, this is not the whole story.
-TCL_STORAGE_CLASS - this is really an import/export flag, depending on if you are
- importing symbols from a DLL (i.e., a user of the DLL), or if
- you are exporting symbols from the DLL (i.e., you are building it.)
- The EXTERN macro includes TCL_STORAGE_CLASS.
- TCL_STORAGE_CLASS is defined to be either DLLIMPORT or DLLEXPORT as
- described below.
-STATIC_BUILD - define this if you are *not* building a DLL
- (e.g., a main program)
-DLL_BUILD - define this if you *are* building a DLL
-DLLIMPORT - If STATIC_BUILD is defined, this becomes nothing.
- (On UNIX, DLLIMPORT is defined to be empty)
- Otherwise, this this expands to __declspec(dllimport)
-DLLEXPORT - If STATIC_BUILD is defined, this becomes nothing.
- (On UNIX, DLLEXPORT is defined to be empty)
- Otherwise, this this expands to __declspec(dllexport)
-
-EXPORT(type, func)
- For the Borland compiler, you need to export functions differently.
- The DLLEXPORT macro is empty, and instead you need to use
- EXPORT because they had a different order. Your declaration will
- look like
- EXTERN EXPORT(int, Foo_Init)(Tcl_Interp *interp);
-We have not defined EXPORT anywhere. You can paste this into your C file:
-#ifndef STATIC_BUILD
-#if defined(_MSC_VER)
-# define EXPORT(a,b) __declspec(dllexport) a b
-# define DllEntryPoint DllMain
-#else
-# if defined(__BORLANDC__)
-# define EXPORT(a,b) a _export b
-# else
-# define EXPORT(a,b) a b
-# endif
-#endif
-#endif
-
-
-How to use these:
-
-Assume your extension is named Foo. In its Makefile, define
-BUILD_Foo so that you know you are building Foo and not using it.
-Then, in your main header file, foo.h, conditionally define
-EXPORT to be either DLLIMPORT or DLLEXPORT based on the
-presense of BUILD_Foo, like this:
-
-#ifndef _FOO
-#define _FOO
-#include "tcl.h"
-/* Additional includes go here */
-/*
- * if the BUILD_foo macro is defined, the assumption is that we are
- * building the dynamic library.
- */
-#ifdef BUILD_Foo
-# undef TCL_STORAGE_CLASS
-# define TCL_STORAGE_CLASS DLLEXPORT
-#endif
-/*
- * Function prototypes for this module.
- */
-EXTERN int Foo_Init _ANSI_ARGS_((Tcl_Interp *interp));
-EXTERN int Foo_SafeInit _ANSI_ARGS_((Tcl_Interp *interp));
-/* Additional prototypes go here */
-/*
- * end of foo.h
- * reset TCL_STORAGE_CLASS to DLLIMPORT.
- */
-# undef TCL_STORAGE_CLASS
-# define TCL_STORAGE_CLASS DLLIMPORT
-#endif /* _FOO */
-
-In your C file, put EXTERN before then functions you need to export.
-If you use Borland, you'll need to use the old EXPORT macro, too.
-
-5. Test suite
+For more information about Compiling Tcl on Windows, please see
+ http://www.scriptics.com/support/howto/compile.html#win
+
+This page includes a lengthy discussion of compiler macros necessary
+when compiling Tcl extensions that will be dynamically loaded.
+
+3. Test suite
-------------
This distribution contains an extensive test suite for Tcl. Some of
the tests are timing dependent and will fail from time to time. If a
test is failing consistently, please send us a bug report with as much
-detail as you can manage.
+detail as you can manage. Please use the form at
+ http://www.scriptics.com/support/bugForm.html
In order to run the test suite, you build the "test" target using the
appropriate makefile for your compiler.
-
-6. Known Bugs
--------------
-
-Here is the current list of known bugs/missing features for the
-Windows version of Tcl:
-
-- Clock command fails to handle daylight savings time boundaries for
- things like "last week".
-- Background processes aren't properly detached on NT.
-- File events only work on sockets and pipes.
-- Files/console/serial ports don't support nonblocking I/O.
-- Environment variables containing international characters aren't
- imported correctly.
-
-If you have comments or bug reports for the Windows version of Tcl,
-please use the form at:
-
-http://www.scriptics.com/support/bugForm.html
-
-If you have comments or bug reports for the Windows version of Tk,
-please direct them to the comp.lang.tcl newsgroup or the
-wintcl@tclconsortium.org mailing list.