readme.bcb 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. Using MFC 4.2 with Borland C++Builder 4.0
  2. -----------------------------------------
  3. Here are the steps to build the MFC libraries with BCB. We will assume
  4. that your copy of Borland C++Builder is located in c:\bcb.
  5. 1) Build the Libraries
  6. -------------------
  7. Note: the makefile's DEBUG=1 switch enables Diagnostics in the libraries
  8. and DBGINFO=1 enables Turbo Debugger information.
  9. 1.1) Static Non-Debug library
  10. ------------------------
  11. To build the static, non-debug library (NAFXCW.LIB)
  12. make -fborland.mak DEBUG=0 LIBDIR=c:\bcb\lib
  13. 1.2) Static Debug library
  14. --------------------
  15. To build the static, debug library (NAFXCWD.LIB)
  16. make -fborland.mak LIBDIR=c:\bcb\lib
  17. 1.3) Non-Debug DLLs and Libraries
  18. ----------------------------
  19. To build the monolithic MFC DLL (BFC42.DLL, BFC42.LIB, and BFC42S.LIB)
  20. make -fbfcdll.mak DEBUG=0 LIBDIR=c:\bcb\lib
  21. NOTE: BFC42.DLL contains everything you'll need for MFC in non-debug
  22. mode. When building MFC with DEBUG=1, you'll end up with 3 DLLs (see
  23. 1.4)
  24. 1.4) Debug DLLs and Libraries
  25. ------------------------
  26. To build the debug MFC DLLs:
  27. BFC42D.DLL, BFC42D.LIB
  28. BFCO42D.DLL, BFCO42D.LIB
  29. BFCN42D.DLL, BFCN42D.LIB
  30. BFCD42D.DLL, BFCD42D.LIB
  31. make -fbfcdll.mak LIBDIR=c:\bcb\lib
  32. make -fbfcole.mak LIBDIR=c:\bcb\lib
  33. make -fbfcnet.mak LIBDIR=c:\bcb\lib
  34. make -fbfcdb.mak LIBDIR=c:\bcb\lib
  35. 2) Install Libraries and DLLs
  36. --------------------------
  37. The libraries that were created should already be in the Borland
  38. directory C:\BCB\LIB. Copy the new DLLs (located in this directory) to
  39. the Windows System directory, typically C:\WINDOWS\SYSTEM32.
  40. 3) Try it out
  41. ----------
  42. The MFC examples all contain Borland C++Builder project files (.BPRs) that
  43. have the proper defines and switches set for the type of MFC application
  44. being built.
  45. In case you want to add these into an existing MAKEFILE or otherwise compile
  46. at the command line, here is a list of the defines that should be added with
  47. -D in a compiler configuration file:
  48. MFC 4.2, Static, No OLE:
  49. _X86_;_WINDOWS;_MSC_VER=1100;_AFX_PORTABLE;_AFX_NOFORCE_LIBS;_MT;
  50. _CRT_PORTABLE;_AFX_NO_DEBUG_CRT;
  51. MFC 4.2, Static, OLE:
  52. INC_OLE2;_X86_;_WINDOWS;_MSC_VER=1100;_AFX_PORTABLE;_AFX_NOFORCE_LIBS;
  53. _MT;_CRT_PORTABLE;_AFX_NO_DEBUG_CRT;
  54. MFC 4.2, Dynamic, No OLE:
  55. _RTLDLL;_AFXDLL;_DLL;_X86_;_WINDOWS;_MSC_VER=1100;_AFX_PORTABLE;
  56. _AFX_NOFORCE_LIBS;_MT;_CRT_PORTABLE;_AFX_NO_DEBUG_CRT;
  57. MFC 4.2, Dynamic, OLE:
  58. INC_OLE2;_RTLDLL;_AFXDLL;_DLL;_X86_;_WINDOWS;_MSC_VER=1100;
  59. _AFX_PORTABLE;_AFX_NOFORCE_LIBS;_MT;_CRT_PORTABLE;_AFX_NO_DEBUG_CRT;
  60. The libraries needed to link with are as follows:
  61. MFC 4.2, Static, No Diagnostics, No OLE:
  62. nafxcw.lib odbc32.lib import32.lib cw32mt.lib
  63. MFC 4.2, Static, No Diagnostics, OLE:
  64. nafxcw.lib ole2w32.lib odbc32.lib import32.lib cw32mt.lib
  65. MFC 4.2, Static, Diagnostics, No OLE:
  66. nafxcwd.lib odbc32.lib import32.lib cw32mt.lib
  67. MFC 4.2, Static, Diagnostics, OLE:
  68. nafxcwd.lib ole2w32.lib odbc32.lib import32.lib cw32mt.lib
  69. MFC 4.2, Dynamic, No Diagnostics, No OLE:
  70. bfcs42.lib bfc42.lib odbc32.lib import32.lib cw32mti.lib
  71. MFC 4.2, Dynamic, No Diagnostics, OLE:
  72. bfcs42.lib bfc42.lib ole2w32.lib odbc32.lib import32.lib cw32mti.lib
  73. MFC 4.2, Dynamic, Diagnostics, No OLE:
  74. bfcs42d.lib bfc42d.lib bfco42d.lib bfcn42d.lib odbc32.lib
  75. import32.lib cw32mti.lib
  76. MFC 4.2, Dynamic, Diagnostics, OLE:
  77. bfcs42d.lib bfc42d.lib bfco42d.lib bfcn42d.lib ole2w32.lib
  78. odbc32.lib import32.lib cw32mti.lib
  79. NOTE: When building from the command line remember to use the -VF switch