Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
4.0 KiB

  1. C++ Library build procedure
  2. --- Setup and Customization ---
  3. Unpack the zipfile. The tree as shipped assumes the root of the source tree
  4. will be at d:\rtl\crt, and the build tree will be at d:\rtl\bld.
  5. Edit settools.cmd to customize for your particular setup. If you want to use
  6. some other location for the source and build trees, edit the CRT_SRC and
  7. CRT_BUILDDIR settings accordingly. You'll also need to change the V6TOOLS
  8. setting to point to the root of your VC6 installation (the parent directory
  9. of the include and lib dirs).
  10. The remainder of this readme assumes you're using the default tree locations.
  11. The C++ headers are found in the source tree at d:\rtl\crt\crtw32\stdhpp. The
  12. C++ support files used to build the static libs and DLL are found at
  13. d:\rtl\crt\crtw32\stdcpp.
  14. There's one file renamed from your distribution. Stdcpp\throw.cpp is actually
  15. stdcpp\stdthrow.cpp. There is already a file throw.cpp in the source tree,
  16. and since when the CRT source is shipped all the source ends up in the same
  17. directory, we can't allow name collisions. The other throw.cpp isn't found
  18. in this distribution, though, since I'm only including those files necessary
  19. to build the C++ libraries.
  20. --- Building ---
  21. From the source tree root, run settools.cmd to establish the build environment.
  22. Then run cleanbld.cmd on WinNT or clns_bld.bat on Win9x to do the build. I'm
  23. not certain if the Win9x build is working - I normally only do WinNT builds.
  24. I have gotten the Win9x build working on my laptop, but can't remember if I
  25. needed to tweak anything to do so (it's at home).
  26. I generally run "cleanbld DELNODE 2>&1 | tee build.log" to do a totally clean
  27. build by wiping out the build tree first, or "cleanbld 2>&1 | tee build.log" if
  28. I'm just trying a rebuild. I don't think the header dependency generation
  29. stuff in the makefile actually works, so a DELNODE build is a good idea after
  30. any header changes.
  31. I've including build.txt as a build log from my system, in case you run into
  32. problems.
  33. The build procedure is actually pretty convoluted. Because we ship source
  34. code, the build actually copies just about everything from the source tree to
  35. the build tree, then "cleanses" the build tree source, removing some internal
  36. comments and #ifs.
  37. The following files are the most interesting ones produced by the build:
  38. Static single-thread:
  39. D:\rtl\bld\crt\src\build\intel\libcp.lib -- release static lib
  40. D:\rtl\bld\crt\src\build\intel\libcp.pdb -- release static lib debug info
  41. D:\rtl\bld\crt\src\build\intel\libcpd.lib -- debug static lib
  42. D:\rtl\bld\crt\src\build\intel\libcpd.pdb -- debug static lib debug info
  43. Static multi-thread:
  44. D:\rtl\bld\crt\src\build\intel\libcpmt.lib -- release static lib
  45. D:\rtl\bld\crt\src\build\intel\libcpmt.pdb -- release static lib debug info
  46. D:\rtl\bld\crt\src\build\intel\libcpmtd.lib -- debug static lib
  47. D:\rtl\bld\crt\src\build\intel\libcpmtd.pdb -- debug static lib debug info
  48. DLL:
  49. D:\rtl\bld\crt\src\build\intel\msvcp61.dll -- release DLL
  50. D:\rtl\bld\crt\src\build\intel\msvcprt.lib -- release DLL import lib
  51. D:\rtl\bld\crt\src\build\intel\dll_pdb\msvcp61.pdb -- release DLL debug info
  52. D:\rtl\bld\crt\src\build\intel\msvcp61d.dll -- debug DLL
  53. D:\rtl\bld\crt\src\build\intel\msvcprtd.lib -- debug DLL import lib
  54. D:\rtl\bld\crt\src\build\intel\dll_pdb\msvcp61d.pdb -- debug DLL debug info
  55. --- Release headers ---
  56. There's one last step in producing the build. The headers must be cleansed
  57. to produce something appropriate for shipping in the INCLUDE directory. This
  58. mostly means _CRTIMP2 must be changed to _CRTIMP, and some #ifs must be
  59. deleted.
  60. CD down to d:\rtl\crt\crtw32\tools\win32. Do "set crtdir=d:\rtl\crt\crtw32"
  61. and run "relinc d:\rtl\relinc". This will copy the C++ headers from stdhpp
  62. over to d:\rtl\relinc, where they will be appropriately cleansed. Normally,
  63. these cleansed headers are then copied to d:\rtl\crt\libw32\include, where they
  64. are checked into the master source tree.
  65. --- ---
  66. Let me know if you have any trouble.
  67. ...Phil
  68. [email protected]
  69. 425-936-7575