Microsoft Tools
---------------
-For Microsoft development tools, rename NT_MAKEFILE as
-MAKEFILE. (Make sure that the CPU environment variable is defined
-to be i386.) In order to use the gc_cpp.h C++ interface, all
-client code should include gc_cpp.h.
+For Microsoft development tools, type
+"nmake -f NT_MAKEFILE cpu=i386 make_as_lib=1 nothreads=1 nodebug=1"
+to build the release variant of the collector as a static library without
+threads support.
+
+In order to use the gc_cpp.h C++ interface, all client code should include
+gc_cpp.h.
[See above for gctest.]
We generally recommend avoiding this if possible, since it seems to
be less than 100% reliable.
-Use gc.mak instead of NT_MAKEFILE to build a version that supports
-both kinds of thread tracking. To build the garbage collector
-test with VC++ from the command line, use
+To build the collector as a dynamic library which handles threads similarly
+to other platforms, type "nmake -f NT_MAKEFILE". If automatic tracking of
+threads attached to the collector DLL (i.e. support of both kinds of thread
+tracking) is needed then delete "-DTHREAD_LOCAL_ALLOC" from NT_MAKEFILE
+manually before the build.
+
+The alternate way (not well tested) to build the dynamic library that supports
+both kinds of thread tracking is to use gc.mak instead of NT_MAKEFILE.
+To build the garbage collector test with VC++ from the command line, use
nmake /F ".\gc.mak" CFG="gctest - Win32 Release"
64-bit Windows on AMD64/Intel EM64T is somewhat supported in the 7.0
and later release. A collector can be built with Microsoft Visual C++ 2005
or with mingw-w64 gcc.
-More testing would clearly be helpful.
-NT_MAKEFILE has been used in this environment. Uncomment the corresponding
-definitions of CPU and CVTRES_CPU variables (commenting out the ones for X86),
-and then type "nmake -f NT_MAKEFILE" in a Visual C++ command line window to
-build the dynamic library with threads support and the usual test programs.
+NT_MAKEFILE has been used in this environment. Type
+"nmake -f NT_MAKEFILE cpu=AMD64 nodebug=1" in a Visual C++ command line
+window to build the release variant of the dynamic library with threads
+support and the usual test programs.
To verify that the collector is at least somewhat functional, run gctest.exe.
This should create gctest.gc.log after a few seconds.
This process is completely analogous to NT_MAKEFILE usage
for the 32-bit library version.
-A similar procedure using NT_MAKEFILE should be usable to
-build the static library (see comments for CFLAGS_SPECIFIC and LINK_GC
-variables in NT_MAKEFILE).
+A similar procedure using NT_MAKEFILE is applicable to build the static
+library - just pass "make_as_lib=1" as an extra argument to nmake.
+If needed, it is also possible to build the library without threads
+support - this could be done by passing "nothreads=1" argument to nmake.
Note that some warnings have been explicitly turned off in the makefile.