home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / watc11up.zip / c_hlp_os2.zip / binp / help / c_readme.inf (.txt) next >
OS/2 Help File  |  2001-08-28  |  298KB  |  3,321 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Introduction to Watcom C/C++ ΓòÉΓòÉΓòÉ
  3.  
  4.  
  5. Welcome to the Watcom C/C++ 11.0 development system.  Version 11.0 of Watcom 
  6. C/C++ is a professional, optimizing, multi-platform C and C++ compiler with a 
  7. comprehensive suite of development tools for developing and debugging both 
  8. 16-bit and 32-bit applications for DOS, extended DOS, Novell NLMs, 16-bit OS/2 
  9. 1.x, 32-bit OS/2, Windows 3.x, Windows 95, Win32s, and Windows NT (Win32). 
  10.  
  11. You should read the entire contents of this booklet, as it contains information 
  12. on new programs and modifications that have been made since the previous 
  13. release. 
  14.  
  15. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  16.  
  17. Special NOTE to users of previous versions!  See the section entitled Release 
  18. Notes for Watcom C/C++ 11.0 to determine if you need to recompile your 
  19. application. 
  20.  
  21. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  22.  
  23.  
  24. ΓòÉΓòÉΓòÉ 1.1. What is in version 11.0 of Watcom C/C++? ΓòÉΓòÉΓòÉ
  25.  
  26.  
  27. Version 11.0 incorporates the features professional developers have been 
  28. demanding: 
  29.  
  30.  Open, Multi-target Integrated Development Environment 
  31.       The IDE allows you to easily edit, compile, link, debug and build 
  32.       applications for 16-bit systems like DOS, OS/2 1.x, and Windows 3.x and 
  33.       32-bit systems like extended DOS, Novell NLMs, OS/2, Windows 3.x 
  34.       (Win32s), Windows 95, and Windows NT.  Projects can be made up of 
  35.       multiple targets which permit a project to include EXEs and DLLs.  The 
  36.       IDE produces makefiles for the project which can be viewed and edited 
  37.       with a text editor.  The IDE is hosted under Windows 3.x, Windows 95, 
  38.       Windows NT, and 32-bit OS/2. 
  39.  
  40.  The Widest Range of Intel x86 Platforms 
  41.  
  42.       Host Platforms 
  43.  
  44.                     DOS (command line) 
  45.                     32-bit OS/2 (IDE and command line) 
  46.                     Windows 3.x (IDE) 
  47.                     Windows 95 (IDE and command line) 
  48.                     Windows NT (IDE and command line) 
  49.  
  50.       16-bit Target Platforms 
  51.  
  52.                     DOS 
  53.                     Windows 3.x 
  54.                     OS/2 1.x 
  55.  
  56.       32-bit Target Platforms 
  57.  
  58.                     Extended DOS 
  59.                     Windows 3.x using our 32-bit extender technology 
  60.                     Win32s 
  61.                     Windows 95 
  62.                     Windows NT 
  63.                     32-bit OS/2 
  64.                     Novell NLMs 
  65.                     AutoCAD ADS 
  66.  
  67.  Cross-Platform Development Tools 
  68.       The core tools in the package permit cross-platform development that 
  69.       allows developers to exploit the advanced features of today's popular 
  70.       32-bit operating systems, including Windows 95, Windows NT, and OS/2. 
  71.       Cross-platform support allows you to develop on a host development 
  72.       environment for execution on a different target system. 
  73.  
  74.  Multi-Platform Debugger 
  75.       The new debugger advances developer productivity.  New features include 
  76.       redesigned interface, ability to set breakpoints on nested function 
  77.       calls, improved C++ and DLL debugging, reverse execution, and 
  78.       configurable interface.  Graphical versions of the debugger are available 
  79.       under Windows 3.x, Windows 95, Windows NT, and 32-bit OS/2.  Character 
  80.       versions of the debugger are available under DOS, Windows 3.x, Windows 
  81.       NT, and 32-bit OS/2.  For VIDEO fans, we have kept the command line 
  82.       compatibility from the original debugger. 
  83.  
  84.  Class Browser 
  85.       The Browser lets you visually navigate the object hierarchies, functions, 
  86.       variable types, and constants of your C/C++ application. 
  87.  
  88.  Performance Analysis 
  89.       The Watcom Execution Sampler and Watcom Execution Profiler are 
  90.       performance analysis tools that locate heavily used sections of code so 
  91.       that you may focus your efforts on these areas and improve your 
  92.       application's performance. 
  93.  
  94.  Editor 
  95.       The Watcom Editor is a context sensitive source editor, integrated into 
  96.       the Windows 3.x, Windows 95 and Windows NT version of the IDE. 
  97.  
  98.  Visual Programmer 
  99.       Blue Sky's Visual Programmer is incorporated in the package.  Visual 
  100.       Programmer is powerful visual design environment for Windows 95 and 
  101.       Windows NT that helps you build sophisticated Windows applications. 
  102.       Visual Programmer provides the familiar elements of the Windows user 
  103.       interface, such as pull-down menus, toolbars, dialog boxes, controls, and 
  104.       other elements as ready-made objects that you can incorporate into your 
  105.       application instantly.  In the visual design environment, you paint your 
  106.       user interface directly on the screen and attach functionality to the 
  107.       interface components by visually connecting them on the screen, without 
  108.       writing a single line of code. 
  109.  
  110.  Graphical Development Tools 
  111.       Watcom C/C++ includes a suite of graphical development tools to aid 
  112.       development of Windows 3.x, Windows 95 and Windows NT applications.  The 
  113.       development tools include: 
  114.  
  115.       Resource Editors 
  116.                 Enable you to create resources for your 16-bit and 32-bit 
  117.                 Windows applications.  For 32-bit OS/2 PM development, Watcom 
  118.                 C/C++ includes IBM's resource editors.  These tools have been 
  119.                 seamlessly integrated into the IDE.  The resource compiler 
  120.                 allows you to incorporate these resources into your 
  121.                 application. 
  122.  
  123.       Resource Compiler 
  124.                 Produces a compiled resource file from a source file. 
  125.  
  126.       Zoom 
  127.                 Magnifies selected sections of your screen. 
  128.  
  129.       Heap Walker 
  130.                 Displays memory usage for testing and debugging purposes. 
  131.  
  132.       Spy 
  133.                 Monitors messages passed between your application and Windows. 
  134.  
  135.       DDESpy 
  136.                 Monitors all DDE activity occurring in the system. 
  137.  
  138.       Dr.  Watcom 
  139.                 Enables you to debug your program by examining both the program 
  140.                 and the system after an exception occurs; monitors native 
  141.                 applications running under Windows 3.x, Windows 95 or Windows 
  142.                 NT. 
  143.  
  144.  Assembler 
  145.       An assembler is now included in the package.  It is compatible with a 
  146.       subset of the Microsoft assembler. 
  147.  
  148.  MFC Support 
  149.       Watcom C/C++ allows you to recompile existing MFC applications for use 
  150.       under Windows 3.x, Windows NT and Win32s.  MFC 4.1 is supported for 
  151.       32-bit applications under Windows NT, Windows 95 and Win32s.  MFC 2.52b 
  152.       is supported for 16-bit applications under Windows 3.x. 
  153.  
  154.  Licensed components of OS/2 2.1 Toolkit 
  155.       Includes the full OS/2 2.1 Presentation manager and character mode APIs, 
  156.       on-line help and example programs. 
  157.  
  158.  Licensed components of Windows 3.1 Toolkit 
  159.       Includes the full Windows 3.1 API libraries and on-line help. 
  160.  
  161.  Licensed components of Windows NT Toolkit 
  162.       Includes the full Windows NT API libraries and on-line help. 
  163.  
  164.  Licensed components of Novell NLM SDK 4.0 
  165.       Includes all header and import files needed to create an NLM. 
  166.  
  167.  Licensed components of the SOMobject's Developer Toolkit for OS/2 
  168.       Watcom C/C++ supports native binding for both C and C++ applications. 
  169.  
  170.  C++ Class Libraries 
  171.       Watcom C/C++ includes container and stream class libraries. 
  172.  
  173.  Royalty-free 32-bit DOS Extender 
  174.       Watcom C/C++ includes the DOS/4GW 32-bit DOS extender by Tenberry 
  175.       Software with royalty-free run-time and virtual memory support up to 
  176.       32MB. 
  177.  
  178.  Support for wide range of DOS Extenders 
  179.       Watcom C/C++ allows you to develop and debug applications based on the 
  180.       following DOS extender technology:  Tenberry Software's DOS/4G and Phar 
  181.       Lap's TNT DOS Extender.  You can also develop applications using 
  182.       FlashTek's DOS Extender but, currently, there is no support for debugging 
  183.       these applications. 
  184.  
  185.  Sample programs and applications 
  186.       Watcom C/C++ includes a large set of sample applications to demonstrate 
  187.       the new integrated development environment. 
  188.  
  189.  
  190. ΓòÉΓòÉΓòÉ 1.2. Technical Support and Services ΓòÉΓòÉΓòÉ
  191.  
  192.  
  193. We are committed to ensuring that our products perform as they were designed. 
  194. Although a significant amount of testing has gone into this product, you may 
  195. encounter errors in the software or documentation.  Our technical support 
  196. offers a variety of services to help you work around any problems you may 
  197. encounter.  Watcom C/C++ 11.0 includes 60-days of free installation assistance. 
  198. Installation assistance will include installing the product and compiling and 
  199. running the samples that are included with the product for your specific 
  200. environment.  Subsequent to this 60-day period, technical assistance is 
  201. available through our fee-based support programs.  Please contact us for more 
  202. information. 
  203.  
  204. In order to keep informed about product updates and announcements, we suggest 
  205. that you send in your registration card.  Product registration cards are 
  206. included in the package and can be mailed or faxed to us. 
  207.  
  208.  
  209. ΓòÉΓòÉΓòÉ 1.2.1. Resources at Your Fingertips ΓòÉΓòÉΓòÉ
  210.  
  211.  
  212. Watcom C/C++ contains many resources to help you find answers to your 
  213. questions.  The documentation is the first place to start.  With each release 
  214. of the product, we update the manuals to answer the most frequently asked 
  215. questions.  Most of this information is also accessible through on-line help. 
  216.  
  217. The "README" file in the main product directory contains up-to-date information 
  218. that recently became available. 
  219.  
  220. Answers to frequently asked questions are available on CompuServe, Powersoft's 
  221. World Wide Web server, Powersoft's FTP site, Powersoft's bulletin board, or the 
  222. Powersoft's Faxline fax back system.  These services are available 24 hours a 
  223. day.  See the Powersoft Customer Services Reference Guide for more information 
  224. on Automated Technical Support (ATS). 
  225.  
  226.  
  227. ΓòÉΓòÉΓòÉ 1.2.2. Contacting Technical Support ΓòÉΓòÉΓòÉ
  228.  
  229.  
  230. Our technical support is available to help resolve technical defects in the 
  231. software.  The following are ways to contact technical support. 
  232.  
  233.  Telephone 
  234.       The telephone number for the Technical Support office nearest to you is 
  235.       listed in the Customer Services Reference Guide. 
  236.  
  237.  Fax 
  238.       The telephone number of the facsimile machine for the Technical Support 
  239.       office nearest to you is listed in the Customer Services Reference Guide. 
  240.  
  241.  World Wide Web 
  242.       You can also send bug reports or enhancement requests to Technical 
  243.       Support using the Powersoft World Wide Web server.  Electronic forms are 
  244.       available for on-line completion. 
  245.  
  246.  FTP 
  247.       You can obtain a copies of the bug report or enhancement request forms 
  248.       from the Powersoft FTP site. 
  249.  
  250.  
  251.          ftp://ftp.powersoft.com/pub/watcom/general/wbugrep.zip 
  252.          ftp://ftp.powersoft.com/pub/watcom/general/wenhreq.zip 
  253.  
  254.  The bug report form (WBUGREP.TXT) is available on Compuserve, the Powersoft 
  255.  BBS, and Faxline (document #1014).  The enhancement request form (WENHREQ.TXT) 
  256.  is available on Compuserve, the Powersoft BBS, and Faxline (document #1015). 
  257.  
  258.  
  259. ΓòÉΓòÉΓòÉ 1.2.3. Information Technical Support Will Need to Help You ΓòÉΓòÉΓòÉ
  260.  
  261.  
  262. Your registration number will be required when you contact Technical Support. 
  263.  
  264. The more information you can provide to your technical support representative, 
  265. the faster they can help you solve your problem.  A detailed description of the 
  266. problem, short sample program, and a summary of steps to duplicate the problem 
  267. (including compiler and linker options) are essential.  Concise problem reports 
  268. allow technical support to quickly pinpoint the problem and offer a resolution. 
  269. Here is a list of information that will help technical support solve the 
  270. problem: 
  271.  
  272.  Contact information 
  273.       We would like your name, as well as telephone and fax numbers where you 
  274.       can be reached during the day. 
  275.  
  276.  Product information 
  277.       Please tell us the product name, version number, patch level, and 
  278.       software registration number. 
  279.  
  280.  Hardware configuration 
  281.       Please tell us what type of processor you are using (e.g., 33MHz 486SX), 
  282.       how much memory is present, what kind of graphics adapter you are using, 
  283.       and how much memory it has. 
  284.  
  285.  Software configuration 
  286.       Please tell us what operating system and version you are using. 
  287.  
  288.  Output from the TECHINFO utility 
  289.       Please provide the output from the Techinfo utility.  It lists current 
  290.       patch levels, environment variable settings, and the contents of your 
  291.       AUTOEXEC.BAT and CONFIG.SYS files. 
  292.  
  293.  Concise problem report with short sample program 
  294.       Please provide a complete description of the problem and the steps to 
  295.       reproduce it.  A small, self-contained program example with compile and 
  296.       link options is ideal. 
  297.  
  298.  An electronic form of communication is often preferable for reporting 
  299.  technical problems.  It provides an easy and efficient way to receive sample 
  300.  code and complete problem details. 
  301.  
  302.  
  303. ΓòÉΓòÉΓòÉ 1.2.4. Making Fixes Available to Developers:  The Patch Utility ΓòÉΓòÉΓòÉ
  304.  
  305.  
  306. We are dedicated to fixing problems in our products.  We developed the patch 
  307. utility to enable timely responses to bugs in the software.  Patches are 
  308. frequently made available and are designed to address problems with the 
  309. software.  When you call technical support one of the first questions asked is 
  310. your current patch level. 
  311.  
  312.  How do I determine the current patch level? 
  313.       Here are two easy ways for you to determine your current patch level: 
  314.  
  315.         1. At the command line, type the command "techinfo".  Among other 
  316.            information, it displays the patch level of the various components 
  317.            in the package. 
  318.  
  319.         2. If you are using the command line tools, both the C and C++ compiler 
  320.            display a banner at startup that echo the version number with the 
  321.            patch level. 
  322.  
  323.  How can I get the patches? 
  324.       Patches are made available on CompuServe, our World Wide Web server, our 
  325.       FTP site, and our bulletin board.  They are available 24 hours a day. 
  326.       Patches are also available on the current release CD-ROM. 
  327.  
  328.  How do I apply the patches? 
  329.       Once you have downloaded the patches, issue the pkunzip command to unzip 
  330.       the patch files.  A "README" file provides information on the patch. 
  331.  
  332.  How can I ensure the patch applied correctly? 
  333.       Running the Techinfo utility indicates the current patch level of the 
  334.       tools.  Ensure that the patch indication for the files is the one you 
  335.       just applied. 
  336.  
  337.  
  338. ΓòÉΓòÉΓòÉ 1.3. Third-party Support ΓòÉΓòÉΓòÉ
  339.  
  340.  
  341. A large number of third party software packages support the use of the Watcom 
  342. C/C++.  We have included a document on the CD-ROM which describes some of these 
  343. packages.  The information on these software packages was provided by the 
  344. developers of these packages.  The document takes the form of a help file, of 
  345. which versions are provided for DOS, Windows 3.x, Windows 95, Windows NT, and 
  346. OS/2. 
  347.  
  348.  
  349. ΓòÉΓòÉΓòÉ 1.4. Suggested Reading ΓòÉΓòÉΓòÉ
  350.  
  351.  
  352. There are a number of good books and references that can help you answer your 
  353. questions.  Following is a list of some of the books and documents we feel 
  354. might be helpful.  This is by no means an exhaustive list.  Contact your local 
  355. bookstore for additional information. 
  356.  
  357.  
  358. ΓòÉΓòÉΓòÉ 1.4.1. C Programmers ΓòÉΓòÉΓòÉ
  359.  
  360.  The C Programming Language, 2nd Edition 
  361.  
  362.  
  363.       Brian W.  Kernighan and Dennis M.Ritchie; Prentice Hall, 1988. 
  364.  
  365.  C DiskTutor 
  366.  
  367.  
  368.       L.  John Ribar; Osborne McGraw-Hill, 1992. 
  369.  
  370.  
  371. ΓòÉΓòÉΓòÉ 1.4.2. C++ Programmers ΓòÉΓòÉΓòÉ
  372.  
  373.  C++ Primer, 2nd Edition 
  374.  
  375.  
  376.       Stanley B.  Lippman; Addison-Wesley Publishing Company, 1991. 
  377.  
  378.  Teach Yourself C++ in 21 Days 
  379.  
  380.  
  381.       Jesse Liberty; Sams Publishing, 1994. 
  382.  
  383.  
  384. ΓòÉΓòÉΓòÉ 1.4.3. DOS Developers ΓòÉΓòÉΓòÉ
  385.  
  386.  PC Interrupts, Second Edition 
  387.  
  388.  
  389.       Ralf Brown and Jim Kyle; Addison-Wesley Publishing Company, 1994. 
  390.  
  391.  Relocatable Object Module Format Specification, V1.1 
  392.  
  393.  
  394.       The Intel OMF specification can be obtained from the Intel ftp site. 
  395.       Here is the URL. 
  396.  
  397.          ftp://ftp.intel.com/pub/tis/omf11g.zip 
  398.  
  399.       This ZIP file contains a Postscript version of the Intel OMF V1.1 
  400.       specification. 
  401.  
  402.  
  403. ΓòÉΓòÉΓòÉ 1.4.4. Extended DOS Developers ΓòÉΓòÉΓòÉ
  404.  
  405.  Extending DOS-A Programmer's Guide to Protected-Mode DOS, 2nd Edition 
  406.  
  407.  
  408.       Ray Duncan, et al; Addison-Wesley Publishing Company, 1992. 
  409.  
  410.  DOS Protected-Mode Interface (DPMI) Specification 
  411.  
  412.  
  413.       The DPMI 1.0 specification can be obtained from the Intel ftp site.  Here 
  414.       is the URL. 
  415.  
  416.          ftp://ftp.intel.com/pub/IAL/software_specs/dpmiv1.zip 
  417.  
  418.       This ZIP file contains a Postscript version of the DPMI 1.0 
  419.       specification. 
  420.  
  421.  
  422. ΓòÉΓòÉΓòÉ 1.4.5. Windows 3.x Developers ΓòÉΓòÉΓòÉ
  423.  
  424.  Microsoft Windows Programmer's Reference 
  425.  
  426.  
  427.       Microsoft Corporation; Microsoft Press, 1990. 
  428.  
  429.  Programming Windows 3.1, Third Edition 
  430.  
  431.  
  432.       Charles Petzold; Microsoft Press, 1992. 
  433.  
  434.  Windows Programming Primer Plus 
  435.  
  436.  
  437.       Jim Conger; Waite Group Press, 1992. 
  438.  
  439.  
  440. ΓòÉΓòÉΓòÉ 1.4.6. Windows NT Developers ΓòÉΓòÉΓòÉ
  441.  
  442.  Advanced Windows NT 
  443.  
  444.  
  445.       Jeffrey Richter; Microsoft Press.  1994. 
  446.  
  447.  Inside Windows NT 
  448.  
  449.  
  450.       Helen Custer; Microsoft Press.  1993. 
  451.  
  452.  Microsoft Win32 Programmer's Reference, Volume One 
  453.  
  454.  
  455.       Microsoft Corporation; Microsoft Press, 1993. 
  456.  
  457.  
  458. ΓòÉΓòÉΓòÉ 1.4.7. OS/2 Developers ΓòÉΓòÉΓòÉ
  459.  
  460.  The Design of OS/2 
  461.  
  462.  
  463.       H.M.  Deitel and M.S.  Kogan; Addison-Wesley Publishing Company, 1992. 
  464.  
  465.  OS/2 Warp Unleashed, Deluxe Edition 
  466.  
  467.  
  468.       David Moskowitz and David Kerr, et al; Sams Publishing, 1995. 
  469.  
  470.  OS/2 Technical Library. 
  471.  
  472.  
  473.       To order the Technical Library, call one of the following numbers. 
  474.  
  475.          In Canada:       1-800-465-1234 
  476.          In the United States: 1-800-426-7282 (OS/2 2.x) 
  477.                     1-800-879-2755 (OS/2 Warp) 
  478.  
  479.       You can also order copies of these books from an IBM authorized dealer or 
  480.       IBM representative. 
  481.  
  482.  
  483. ΓòÉΓòÉΓòÉ 1.4.8. Virtual Device Driver Developers ΓòÉΓòÉΓòÉ
  484.  
  485.  Writing Windows Virtual Device Drivers 
  486.  
  487.  
  488.       David Thielen and Bryan Woodruff; Addison-Wesley Publishing Company, 
  489.       1994. 
  490.  
  491.  
  492. ΓòÉΓòÉΓòÉ 2. Installation ΓòÉΓòÉΓòÉ
  493.  
  494.  
  495. The package contains the following components: 
  496.  
  497.      Watcom C/C++ CD-ROM 
  498.      This manual 
  499.      Registration Card 
  500.      Envelope containing important information 
  501.      Customer Services Reference Guide 
  502.  
  503.  
  504. ΓòÉΓòÉΓòÉ 2.1. Send in Your Registration Card ΓòÉΓòÉΓòÉ
  505.  
  506.  
  507. You should fill out and mail your registration card as soon as possible to 
  508. ensure you are informed of future upgrades and other special offers to 
  509. registered users.  Your registration number is printed on the registration 
  510. card.  Retain the other portion of the registration card for your records. 
  511. Your registration number is printed on it.  You will need this number when you 
  512. contact Technical Support. 
  513.  
  514.  
  515. ΓòÉΓòÉΓòÉ 2.2. Hardware and Software Requirements ΓòÉΓòÉΓòÉ
  516.  
  517.  
  518. Watcom C/C++ requires the following minimum configuration: 
  519.  
  520.      IBM PC compatible 
  521.      An 80386 or higher processor 
  522.      8 MB of memory 
  523.      441 MB of disk space. 
  524.  
  525.       Note that the disk space requirement varies with the disk cluster size. 
  526.       The larger the cluster size, the greater the disk requirement.  If your 
  527.       hard disk has 8K clusters (257MB to 512MB), a complete installation will 
  528.       require 441 MB megabytes of disk space.  If your hard disk has 16K 
  529.       clusters (513MB to 1GB), a complete installation will require 514 MB 
  530.       megabytes.  A selective install will require considerably less space. 
  531.      A CD-ROM disk drive 
  532.  
  533.  In addition to the above requirements, you need one of the following operating 
  534.  systems: 
  535.  
  536.      DOS version 5.0 or higher 
  537.      Microsoft Windows version 3.1 running in enhanced mode 
  538.      Microsoft Windows 95 
  539.      Microsoft Windows NT version 3.1 or higher 
  540.      IBM OS/2 2.1 or higher 
  541.  
  542.  You must install the software from a CD-ROM drive.  Unlike earlier releases, 
  543.  it is now no longer possible to copy the installation files to diskettes and 
  544.  install the software from your diskette drive. 
  545.  
  546.  
  547. ΓòÉΓòÉΓòÉ 2.3. The README File ΓòÉΓòÉΓòÉ
  548.  
  549.  
  550. Before you install Watcom C/C++, you should read the contents of the "README" 
  551. file which is stored in the root directory of the CD-ROM.  It contains 
  552. valuable, up-to-date information concerning this product. 
  553.  
  554.  
  555. ΓòÉΓòÉΓòÉ 2.4. Installing Watcom C/C++ ΓòÉΓòÉΓòÉ
  556.  
  557.  
  558. The installation program in this version has been completely redesigned with 
  559. several new "smart" features.  If you have installed a previous version of 
  560. Watcom C/C++ then you should install Watcom C/C++ 11.0 into the same path 
  561. (except for the reason described in the following paragraph).  It will examine 
  562. a previous installation to determine what features were previously installed. 
  563. It will use this information to establish default settings for the installation 
  564. that you are about to attempt.  Of course, you can add or remove features as 
  565. you progress through the installation steps. 
  566.  
  567. If you are installing only one of the Watcom C/C++ or Watcom FORTRAN 77 
  568. products and you have an older version of the other product, we do NOT 
  569. recommend that you install the new product into the same directory as the old 
  570. product. The Watcom C/C++ and Watcom FORTRAN 77 products are compatible at the 
  571. same version number.  However, the Watcom C/C++ and Watcom FORTRAN 77 products 
  572. are usually NOT compatible across different version numbers (e.g., version 9.5 
  573. of Watcom FORTRAN 77 is not compatible with version 10.5 of Watcom C/C++ and 
  574. vice versa).  If this is the case, care must be exercised when switching 
  575. between use of the two products.  Environment variables such as PATH and WATCOM 
  576. must be modified and/or corrected.  System files such as CONFIG.SYS and 
  577. SYSTEM.INI must be modified and/or corrected. 
  578.  
  579. If you are installing both Watcom C/C++ 11.0 and Watcom FORTRAN 77 11.0, we 
  580. recommend that you install both products under the same directory.  This will 
  581. eliminate duplication of files and, as a result, reduce the total required disk 
  582. space.  The two products share the use of certain environment variables which 
  583. point to the installation directory.  If separate installation directories are 
  584. used, problems will arise. 
  585.  
  586. When you install Watcom C/C++ and Watcom FORTRAN 77 in the same directory, you 
  587. should not deselect any options when running the second installation; otherwise 
  588. the second product's install may remove files that were installed (and are 
  589. required) by the first product's install.  This isn't an issue if you only have 
  590. one of Watcom C/C++ or Watcom FORTRAN 77. The problem is that Watcom C/C++ and 
  591. Watcom FORTRAN 77 don't know about the installation options you have selected 
  592. for each other's product. 
  593.  
  594. If you wish to create a backup of your previous version, please do so before 
  595. installing Watcom C/C++ 11.0. 
  596.  
  597. If you decide to install Watcom C/C++ 11.0 into a different directory than the 
  598. previously installed version, you will have to manually edit system files 
  599. (e.g., CONFIG.SYS, AUTOEXEC.BAT, SYSTEM.INI) after the installation process is 
  600. complete to remove the old version from various environment variables (e.g., 
  601. PATH, DEVICE=).  This is necessary since the path to the new version will 
  602. appear after the path to the old version.  To avoid this extra work, we 
  603. recommend installing the new version into the same path as the old version. 
  604.  
  605. As an example, here are a few of the environment variables and "RUN" directives 
  606. that are modified/added to the OS/2 CONFIG.SYS file.  You should make sure that 
  607. all references to the older version of the software are removed. 
  608.  
  609. Example: 
  610.  
  611.    LIBPATH=...;D:\WATCOM\BINP\DLL;... 
  612.    SET PATH=...;D:\WATCOM\BINP;D:\WATCOM\BINW;... 
  613.    SET HELP=...;D:\WATCOM\BINP\HELP;... 
  614.    SET BOOKSHELF=...;D:\WATCOM\BINP\HELP;... 
  615.    SET INCLUDE=...;D:\WATCOM\H\OS2;D:\WATCOM\H; 
  616.    SET IPFC=D:\WATCOM\TOOLKT2X\IPFC 
  617.    SET WATCOM=D:\WATCOM 
  618.    SET EDPATH=D:\WATCOM\EDDAT 
  619.    RUN=D:\WATCOM\BINP\BATSERV.EXE 
  620.    RUN=D:\WATCOM\BINP\NMPBIND.EXE 
  621.  
  622. You may wish to run Watcom C/C++ under more than one operating system on the 
  623. same personal computer.  For every operating system that you use, simply start 
  624. up the operating system and run the corresponding install procedure. 
  625.  
  626. If you run the Windows 3.x installation procedure, you do not need to run the 
  627. DOS installation procedure also. 
  628.  
  629. If you plan to use Win-OS/2 as a development platform under OS/2, you must run 
  630. the Windows 3.1 install program (selecting Windows 3.1 host support). 
  631.  
  632. Place the CD-ROM disk in your CD-ROM drive.  Select one of the following 
  633. procedures depending on the host operating system that you are currently 
  634. running.  Below, substitute the CD-ROM drive specification for "x:". 
  635.  
  636.  DOS 
  637.       Enter the following command: 
  638.  
  639.  
  640.          x:\setup 
  641.  
  642.  Windows 3.x 
  643.       Start Windows 3.x and choose Run from the File menu of the Program 
  644.       Manager.  Enter the following command: 
  645.  
  646.  
  647.          x:\setup 
  648.  
  649.  Windows 95 
  650.       Choose Run from the Start menu and enter the following command: 
  651.  
  652.  
  653.          x:\setup 
  654.  
  655.  Windows NT 
  656.       Log on to an account that is a member of the "Administrator" group so 
  657.       that you have sufficient rights to modify the system environment.  Choose 
  658.       Run from the File menu of the Program Manager.  Enter the following 
  659.       command: 
  660.  
  661.  
  662.          x:\setup 
  663.  
  664.  OS/2 
  665.       Start an OS/2 session and enter the following command: 
  666.  
  667.  
  668.          x:\install 
  669.  
  670.  
  671. ΓòÉΓòÉΓòÉ 2.5. Incremental Installation ΓòÉΓòÉΓòÉ
  672.  
  673.  
  674. You may wish to install Watcom C/C++, and subsequently install features that 
  675. you omitted in the first install.  You can also remove features that you no 
  676. longer wish to have installed.  You can achieve this as follows: 
  677.  
  678.    1. Start the installation program. 
  679.  
  680.    2. Select any new features that you wish to install. 
  681.  
  682.    3. Deselect any features that you wish to remove. 
  683.  
  684.    4. Re-run the installation program for each host operating system that you 
  685.       use. 
  686.  
  687.  
  688. ΓòÉΓòÉΓòÉ 2.6. System Configuration File Modifications ΓòÉΓòÉΓòÉ
  689.  
  690.  
  691. The install program makes changes to your operating system startup files to 
  692. allow Watcom C/C++ to run.  We strongly recommend that you allow the install 
  693. program to modify your system configuration files for you, but you may do it by 
  694. hand.  The changes required may be found in any of the following files which 
  695. have been placed in the root of the installation directory: 
  696.  
  697.  CONFIG.NEW 
  698.       Changes required for CONFIG.SYS (DOS, Windows, Windows 95, OS/2) 
  699.  
  700.  AUTOEXEC.NEW 
  701.       Changes required for AUTOEXEC.BAT (DOS, Windows, Windows 95, OS/2) 
  702.  
  703.  CHANGES.ENV 
  704.       Changes required for the Windows NT environment 
  705.  
  706.  
  707. ΓòÉΓòÉΓòÉ 2.7. Installation Notes for Windows 3.x ΓòÉΓòÉΓòÉ
  708.  
  709.    1. When you use the Integrated Development Environment under Windows 3.x, it 
  710.       is important that the IDE's batch server program be able to run in the 
  711.       background.  Therefore, make sure that the "Exclusive in Foreground" 
  712.       checkbox is NOT checked in the "Scheduling" options of "386 Enhanced" in 
  713.       the "Control Panel". 
  714.  
  715.    2. When you use the Integrated Development Environment under Windows 3.x, 
  716.       the line 
  717.  
  718.  
  719.          OverlappedIO=ON 
  720.  
  721.       in your "SYSTEM.INI" file can cause problems.  This controls (disables) 
  722.       the queuing of DiskIO and makes some changes between DOS box timings to 
  723.       allow some processes to finish. 
  724.  
  725.    3. When you use the Integrated Development Environment under Windows 3.x, it 
  726.       is important that the line 
  727.  
  728.  
  729.          NoEMMDriver=ON 
  730.  
  731.       not appear in your "SYSTEM.INI" file.  It will prevent a link from 
  732.       succeeding in the IDE.. 
  733.  
  734.    4. When you use the Integrated Development Environment under Windows 3.x on 
  735.       the NEC PC-9800 series, it is important that the line 
  736.  
  737.  
  738.          InDOSPolling=TRUE 
  739.  
  740.       not appear in your "SYSTEM.INI" file.  It will prevent a make from 
  741.       succeeding in the IDE. 
  742.  
  743.    5. Central Point Software's anti-virus programs (VDEFEND, VSAFE, VWATCH) 
  744.       conflict with the Integrated Development Environment under Windows 3.x. 
  745.  
  746.    6. The Program Information File "BATCHBOX.PIF" is used by the Integrated 
  747.       Development Environment (IDE) to start up a background batch server for 
  748.       compiling, linking, etc.  The PIF references "COMMAND.COM".  If you are 
  749.       using a substitute for "COMMAND.COM" such as "4DOS.COM" then you must 
  750.       modify the PIF accordingly using a PIF editor. 
  751.  
  752.  
  753. ΓòÉΓòÉΓòÉ 2.8. Installation Notes for OS/2 ΓòÉΓòÉΓòÉ
  754.  
  755.    1. The Integrated Development Environment (IDE) uses the IBM OS/2 Enhanced 
  756.       System Editor (EPM) for editing text files.  You must ensure that EPM is 
  757.       installed in your OS/2 system if you are planning to use the IDE.  You 
  758.       can selectively install the Enhanced Editor by running the OS/2 Setup and 
  759.       Installation program (Selective Install) and choosing "Enhanced Editor" 
  760.       from the "Tools and Games" detail page. 
  761.  
  762.    2. The Integrated Development Environment (IDE) requires that the 
  763.       BATSERV.EXE program be started during OS/2 initialization.  If you plan 
  764.       to use the IDE, do not remove the "RUN=" line for this file from your 
  765.       CONFIG.SYS file. 
  766.  
  767.    3. On some systems with limited memory that use the UNDELETE feature of 
  768.       OS/2, compile times may be slow because OS/2 is saving copies of compiler 
  769.       temporary files.  You may start the BATSERV process using the OS/2 
  770.       STARTUP.CMD file with DELDIR turned off as illustrated below. 
  771.  
  772.  
  773.          SET OLD_DEL_DIR=%DELDIR% 
  774.          SET DELDIR= 
  775.          DETACH C:\WATCOM\BINP\BATSERV.EXE 
  776.          SET DELDIR=%OLD_DEL_DIR% 
  777.          SET OLD_DEL_DIR= 
  778.  
  779.    4. If you plan to use the Named Pipe Remote Debugging support of the Watcom 
  780.       Debugger then the NMPSERV.EXE.  program must be started during OS/2 
  781.       initialization.  If you plan to use this feature, do not remove the 
  782.       "RUN=" line for this file from your CONFIG.SYS file. 
  783.  
  784.  
  785. ΓòÉΓòÉΓòÉ 2.9. Installation Notes for Win32s ΓòÉΓòÉΓòÉ
  786.  
  787.  
  788. There is a directory called WIN32S in the SDK directory of the CD-ROM.  It 
  789. contains the entire Win32s directory structure.  The Watcom C/C++ install 
  790. program will install Win32s onto your computer system, but it will not install 
  791. the debug version of Win32s.  If you want to use the debug version of Win32s, 
  792. type the commands: 
  793.  
  794.  
  795.    X: 
  796.    cd \sdk\win32s 
  797.    install D: 
  798.  
  799. where "X" is the drive letter of your CD-ROM drive, and "D" is the drive you 
  800. want to install Win32s on.  Once you have done this, you can use SWITCH.BAT in 
  801. the WIN32S\BIN directory to switch between the debug and non-debug versions of 
  802. Win32s. 
  803.  
  804. As an alternative to installing Win32s using the Watcom C/C++ install program, 
  805. you can run X:\SDK\WIN32S\DISKS\DISK1\SETUP.EXE. 
  806.  
  807.  
  808. ΓòÉΓòÉΓòÉ 3. Hands-on Introduction to Watcom C/C++ ΓòÉΓòÉΓòÉ
  809.  
  810.  
  811. Let's get started and introduce some of the new tools that are in version 11. 
  812. The purpose of this chapter is to briefly test out the new graphical tools in 
  813. version 11 using an existing application. 
  814.  
  815. In this tutorial, we will take an existing set of C++ source files, create a 
  816. project in our integrated development environment, and perform the following 
  817. tasks: 
  818.  
  819.      Add multiple targets 
  820.      Make a target 
  821.      Make all targets 
  822.      Execute the program 
  823.      Debug the program 
  824.      Use the Browser 
  825.      Correct errors 
  826.      Sample and profile the executable 
  827.      Save the project 
  828.      Terminate the session 
  829.  
  830.  
  831. ΓòÉΓòÉΓòÉ 3.1. Outline ΓòÉΓòÉΓòÉ
  832.  
  833.  
  834. Watcom's Integrated Development Environment (IDE) manages the files and tools 
  835. that a programmer uses when developing a project.  This includes all the source 
  836. files, include files, libraries, compiler(s), linkers, preprocessors, etc. 
  837. that one uses. 
  838.  
  839. The IDE has a graphical interface that makes it easy to visualize the make-up 
  840. of a project.  A single IDE session shows a project.  If the project consists 
  841. of a number of components, such as two executables and one library, these are 
  842. each shown as target windows in the project window.  Each target window shows 
  843. the files that are needed to construct the target and is associated via its 
  844. filename extension with a rule that describes the construction mechanism.  For 
  845. example, a filename with the extension ".EXE" may be associated with the rule 
  846. for constructing 32-bit Windows executables, or a filename with the extension 
  847. ".LIB" may be associated with the rule for constructing static libraries. 
  848. Different projects can refer to the same target.  If they do, the target is 
  849. shared and can be manipulated via either project, with changes made through one 
  850. affecting the other. 
  851.  
  852. The IDE itself is a collection of programs that manages the various files and 
  853. tools used to create the target libraries and executables.  It creates 
  854. makefile(s) from the information in the target descriptions and invokes Watcom 
  855. Make to construct the targets themselves.  A configuration file contains 
  856. built-in knowledge of the Watcom compilers, editors, Profiler, and Browser, as 
  857. well as all their switches. 
  858.  
  859.  
  860. ΓòÉΓòÉΓòÉ 3.2. The Watcom C/C++ Tutorial ΓòÉΓòÉΓòÉ
  861.  
  862.  
  863. This tutorial walks you through the creation and execution of a C/C++ program 
  864. under Windows.  This will give you an understanding of the basic concepts of 
  865. the IDE and its components, and it will detail the steps involved in project 
  866. development.  The result of this tutorial is a three dimensional drawing of a 
  867. kitchen which you can manipulate using either the menus or the icons on the 
  868. toolbar.  You can rotate and resize the drawing, as well as adjust the lighting 
  869. and contrast. 
  870.  
  871. To begin, start the IDE.  This is done by double-clicking on the "IDE" icon in 
  872. the Watcom C/C++ window. 
  873.  
  874. A status field at the bottom of the IDE window indicates the function of the 
  875. icon on the toolbar over which your mouse cursor is currently positioned.  If 
  876. the status area does not show you the function of the icons as you move the 
  877. mouse cursor over them, check that no item in the menu bar is highlighted (if 
  878. one is highlighted, press the Alt key). 
  879.  
  880.  
  881. Figure 1. The initial IDE screen 
  882.  
  883.  
  884. ΓòÉΓòÉΓòÉ 3.2.1. Defining a Project ΓòÉΓòÉΓòÉ
  885.  
  886.  
  887. In this tutorial, you will be creating a new project called KITCHEN.  Here are 
  888. the steps required to accomplish this task. 
  889.  
  890.    1. Define a new project by pulling down the File menu and selecting the New 
  891.       Project...  item.  You can also define a new project by clicking on the 
  892.       "Create a new project" icon on the toolbar. 
  893.  
  894.    2. A choice of different sample project directories is available.  Assuming 
  895.       that you installed the Watcom C/C++ software in the \WATCOM directory, 
  896.       you will find the sample project directories in the following directory: 
  897.  
  898.  
  899.          \WATCOM\SAMPLES\IDE 
  900.  
  901.       For purposes of this tutorial, we recommend that you select one of the 
  902.       following project directories: 
  903.  
  904.       WIN 
  905.                 for an example of 16-bit Windows 3.x application development 
  906.                 when using Windows 3.x under DOS as a host development system, 
  907.  
  908.       WIN386 
  909.                 for an example of 32-bit Windows 3.x application development 
  910.                 when using Windows 3.x under DOS as a host development system, 
  911.  
  912.       WIN32 
  913.                 for an example of 32-bit Win32 application development when 
  914.                 using Windows NT or Windows 95 as a host development system, 
  915.                 and 
  916.  
  917.       OS2 
  918.                 for an example of 32-bit OS/2 application development when 
  919.                 using 32-bit OS/2 as a host development system. 
  920.       Thus the target that we refer to below should be one of WIN, WIN386, 
  921.       WIN32, or OS2 depending on your selection.  The tutorial uses the WIN32 
  922.       example for illustrative purposes.  You will find some minor variations 
  923.       from your selected target environment. 
  924.  
  925.       When asked for a project name, you can do one of two things: 
  926.  
  927.         a. enter the following pathname: 
  928.  
  929.  
  930.               d:[path]\SAMPLES\IDE\target\KITCHEN 
  931.  
  932.            where d:[path] is the drive and path where you installed the Watcom 
  933.            software, or 
  934.  
  935.         b. use the file browser to select the following directory: 
  936.  
  937.  
  938.               d:[path]\SAMPLES\IDE\target 
  939.  
  940.            and specify the filename KITCHEN. 
  941.  
  942.       Figure 2. Creating a new project 
  943.  
  944.       Press the Enter key or click on OK (OPEN). 
  945.  
  946.       The project description will be stored in this file and the IDE will set 
  947.       the current working directory to the specified path during your session. 
  948.  
  949.    3. You will be prompted for a target name.  Since we will be attaching 
  950.       pre-defined targets, just click the Browse button when prompted for the 
  951.       target name.  Select the "draw" target file (it will be one of 
  952.       DRAW16.TGT, DRAW.TGT, DRAW32.TGT, DRAWOS2.TGT depending on your selection 
  953.       of target). 
  954.  
  955.  
  956.       Figure 3. Attaching existing targets 
  957.  
  958.       Press the Enter key or click on OK (OPEN). 
  959.  
  960.    4. You can ignore the settings displayed for Target Environment and Image 
  961.       Type since the target definition already exists (we created it for you). 
  962.       The settings are important when you a defining a new target (i.e., one 
  963.       that was not predefined). 
  964.  
  965.  
  966.       Figure 4. Selecting a target type 
  967.  
  968.       Press the Enter key or click on OK. 
  969.  
  970.  A target window is created in the project window for the "draw" target.  This 
  971.  window contains all of the files associated with the target.  You can click on 
  972.  any of the "Folder" icons to hide or un-hide all files with a particular 
  973.  extension.  For example, you may wish to un-hide all the files with a .BMP 
  974.  extension by clicking on the folder icon associated with bitmap files. 
  975.  
  976.  
  977. ΓòÉΓòÉΓòÉ 3.2.2. Adding Multiple Targets ΓòÉΓòÉΓòÉ
  978.  
  979.  
  980. Watcom's IDE allows you to have multiple targets in any particular project. 
  981. Note that targets can be used by multiple projects.  To add a new target to the 
  982. project, do the following. 
  983.  
  984.    1. Pull down the Targets menu and select the New Target...  item. 
  985.  
  986.    2. Enter BUTTON.TGT as the target name for the new target to be added to the 
  987.       project.  Do not forget to include the .TGT extension.  It is required 
  988.       when selecting a pre-existing target. 
  989.  
  990.    3. You can ignore the settings displayed for Target Environment and Image 
  991.       Type since the target definition already exists (we created it for you). 
  992.       The settings are important when you a defining a new target (i.e., one 
  993.       that was not predefined). 
  994.  
  995.    4. Press the Enter key or click on OK. 
  996.  
  997.  A target window is created in the project window for the button target. 
  998.  
  999.  
  1000. ΓòÉΓòÉΓòÉ 3.2.3. Making a Target ΓòÉΓòÉΓòÉ
  1001.  
  1002.  
  1003. Watcom's IDE will automatically generate the sequence of steps required to 
  1004. build or "make" each of the targets in a project.  Note that the targets in a 
  1005. project can be made individually or collectively.  To make the button.lib 
  1006. target, do the following. 
  1007.  
  1008.    1. Click on the window of the target you wish to make.  In this case, click 
  1009.       on the button.lib target window. 
  1010.  
  1011.    2. Pull down the Targets menu and select the Make item (you can also do this 
  1012.       by clicking on the "Make the current target" icon on the toolbar, or by 
  1013.       right-clicking on the target and selecting the Make item from the pop-up 
  1014.       menu). 
  1015.  
  1016.  The IDE will now construct a makefile based on its knowledge of the target and 
  1017.  construction rules, and then invoke the make utility to create the target, in 
  1018.  this case button.lib.  The output of this procedure is displayed in the Log 
  1019.  window. 
  1020.  
  1021.  
  1022. ΓòÉΓòÉΓòÉ 3.2.4. Making All Targets ΓòÉΓòÉΓòÉ
  1023.  
  1024.  
  1025. Click the "Make all targets in the project" icon on the toolbar to make all of 
  1026. the targets in the current project.  If one target depends on another target, 
  1027. the latter target will be made first.  In this tutorial BUTTON.LIB will be made 
  1028. first (there will be nothing to do since it was made previously) and then 
  1029. DRAW???.EXE, since BUTTON.LIB is in the list of files associated with 
  1030. DRAW???.EXE.  In each case, the IDE constructs makefiles based on its knowledge 
  1031. of the target and construction rules.  The output of this procedure is 
  1032. displayed in the Log window. 
  1033.  
  1034.  
  1035. Figure 5. Making one or more targets 
  1036.  
  1037.  
  1038. ΓòÉΓòÉΓòÉ 3.2.5. Executing the Program ΓòÉΓòÉΓòÉ
  1039.  
  1040.  
  1041. The project should have built without errors, so now you are ready to execute 
  1042. the program you have developed. 
  1043.  
  1044. Click on the DRAW???.EXE target window and simply click on the "Run the current 
  1045. target" icon on the toolbar.  You can also do this by selecting Run from the 
  1046. Targets menu, or right-clicking anywhere on the target window outside of the 
  1047. inner frame and selecting Run from the pop-up menu (right-clicking is context 
  1048. sensitive and the pop-up menu that results will vary depending on the area of 
  1049. the window in which you right-click). 
  1050.  
  1051.  
  1052. Figure 6. The kitchen demo 
  1053.  
  1054. The demo you have created is a simple three dimensional drawing of a kitchen. 
  1055. By using either the icons on the toolbar or the menus you can rotate the 
  1056. picture left, right, up, and down, make the picture brighter or dimmer, move 
  1057. the picture closer or farther away, and increase or decrease the amount of 
  1058. contrast (this latter feature is found in the "Lighting" menu).  Choose Exit 
  1059. from the File menu to exit the demo program when you are finished. 
  1060.  
  1061.  
  1062. ΓòÉΓòÉΓòÉ 3.2.6. Smart Editing ΓòÉΓòÉΓòÉ
  1063.  
  1064.  
  1065. The IDE recognizes the type of file you wish to edit, and invokes the 
  1066. appropriate editor for the task.  To edit a file, you either double-click on it 
  1067. or select it and click the "Edit" icon on the toolbar.  Files with a .C, .CPP, 
  1068. .H, .HPP, .FOR, .ASM or .RC extension are edited with a text editor; files with 
  1069. a .BMP, .ICO, or .CUR extension are edited with the Image Editor; files with a 
  1070. .DLG or .RES extension are edited with the Resource Editor. 
  1071.  
  1072.  
  1073. Figure 7. The Watcom Editor for Windows 
  1074.  
  1075. Now we will edit one of the source files and introduce an error into the 
  1076. application. 
  1077.  
  1078.    1. Double-click on the "draw" source file (i.e., DRAW???.C) to load the 
  1079.       source file into the editor. 
  1080.  
  1081.    2. Scroll down to line 217 using the keyboard or mouse.  You can also pull 
  1082.       down the Edit menu, select Goto Line..., and enter 217.  The Watcom 
  1083.       Editor makes full use of colors and fonts to achieve syntax highlighting. 
  1084.       File templates for C, C++, and FORTRAN files are defined to assist you in 
  1085.       distinguishing the components of your code. 
  1086.  
  1087.    3. Pull down the Options menu and select the Colors item. 
  1088.  
  1089.    4. Click on a color from the palette, drag it to the word if on line 218, 
  1090.       and release it.  All keywords are now displayed in the chosen color. 
  1091.       Drag a different color to a comment line (line 225) and all comments will 
  1092.       display in that color.  Similarly, you can select the Fonts item from the 
  1093.       Options menu, select a font style and size, and drag it to your source 
  1094.       file.  Close the Fonts and Colors dialog by double-clicking in the upper 
  1095.       left hand corner. 
  1096.  
  1097.    5. You can now save this color and font configuration for all .CPP files by 
  1098.       pulling down the Options menu, selecting the General..., item and 
  1099.       clicking next to Save configuration on exit in the "Features" box.  Press 
  1100.       Enter or click on OK. 
  1101.  
  1102.    6. Now, to introduce an error into the application, replace the line #if 0 
  1103.       with #if 1. 
  1104.  
  1105.    7. Save your changes by clicking on the "Write the current file to disk" 
  1106.       icon or select Save from the File menu. 
  1107.  
  1108.    8. Return to the IDE (by clicking on it if it is visible on your screen, or 
  1109.       by using Alt-Tab), re-make your project, and run it.  A fault occurs in 
  1110.       your application, so the next step is to track down the problem using the 
  1111.       Watcom Debugger. 
  1112.  
  1113.  
  1114. ΓòÉΓòÉΓòÉ 3.2.7. Debugging the Program ΓòÉΓòÉΓòÉ
  1115.  
  1116.  
  1117. To debug a program it must first be compiled to include debugging information. 
  1118. The IDE maintains two sets of switches for each target in a project.  These are 
  1119. known as the Development Switches and the Release Switches. 
  1120.  
  1121.    1. Right click on DRAW???.C and select Source options from the pop-up menu. 
  1122.       Select C Compiler Switches from the sub-menu. 
  1123.  
  1124.       By default, your target is placed in development mode with the debugging 
  1125.       switches for the compiler and linker set to include debugging 
  1126.       information.  You can either set the switches in each category manually 
  1127.       or you can copy the default Release switches using the CopyRel button. 
  1128.       This method of setting switches is especially convenient since you can 
  1129.       specify everything from diagnostic, optimization, and code generation 
  1130.       switches to special linker switches all without having to memorize a 
  1131.       cryptic switch name - you simply click next to the switches you wish to 
  1132.       use for a particular item. 
  1133.  
  1134.    2. Scroll through the categories using the >> button until you get to: 
  1135.  
  1136.  
  1137.          6. Debugging Switches 
  1138.  
  1139.       We can see that full debugging information was used in the compile, so 
  1140.       just click on Cancel to exit this screen. 
  1141.  
  1142.  
  1143.       Figure 8. Setting compiler switches 
  1144.  
  1145.    3. To invoke the debugger, pull down the Targets menu and choose the Debug 
  1146.       item or select the "Debug the current target" icon from the toolbar. 
  1147.  
  1148.  The Watcom Debugger is designed to be as convenient and intuitive as possible, 
  1149.  while at the same time providing a comprehensive and flexible environment for 
  1150.  serious debugging.  You can configure your environment to display exactly the 
  1151.  information you require to be most productive.  Among the windows available 
  1152.  are source and assembly, modules, functions, calls, threads, images, watches, 
  1153.  locals, globals, file variables, registers, 80x87 FPU, stack, I/O ports, 
  1154.  memory display, and a log window.  You can step through your source using the 
  1155.  keys or icons on the toolbar.  Execute one line at a time by stepping over 
  1156.  calls or stepping into calls, or execute until the current function returns. 
  1157.  Right-mouse button functionality gives context-sensitive pop-up menus. 
  1158.  
  1159.  
  1160.  Figure 9. The Watcom Debugger 
  1161.  
  1162.  We know that a fault has occurred in DRAW???.EXE, so we will run the 
  1163.  application and examine the state of the program when the fault occurs. 
  1164.  
  1165.    1. Click on the "go!" icon on the toolbar to begin execution of the program. 
  1166.       The exception occurs and the source window shows the line 
  1167.  
  1168.  
  1169.          *pwidth = bitmap.bmWidth + 5; 
  1170.  
  1171.       in the function button_size as the last line executed before the 
  1172.       exception.  Examining the Locals window you will see that pwidth is a 
  1173.       NULL pointer, hence the exception. 
  1174.  
  1175.    2. We can now move up the call stack by clicking on the "Move up the call 
  1176.       stack" icon on the toolbar (red up arrow) to follow the program's 
  1177.       execution.  On the previous line, we see button_size is called from 
  1178.       add_button.  Moving up the call stack again, we see add_button is called 
  1179.       with NULL as its fifth parameter.  An artificial error has been 
  1180.       introduced for the purposes of this tutorial.  It is located several 
  1181.       lines back in the source file. 
  1182.  
  1183.    3. By replacing the line #if 1 with #if 0 we can bypass this error. 
  1184.       Right-click on the line #if 1 and select Show, then Line...  from the 
  1185.       pop-up menus to see the line number which must be corrected, then exit 
  1186.       the debugger. 
  1187.  
  1188.    4. Double-click on DRAW???.C to load the source file into the editor. 
  1189.  
  1190.    5. Scroll down to line 217 using the keyboard or mouse, or pull down the 
  1191.       Edit menu, select Goto Line..., and enter 217. 
  1192.  
  1193.    6. Replace the line #if 1 with #if 0 and save your changes by clicking on 
  1194.       the "Write the current file to disk" icon or selecting Save from the File 
  1195.       menu. 
  1196.  
  1197.    7. Return to the IDE (by clicking on it if it is visible on your screen, or 
  1198.       by using Alt-Tab) and re-make your project. 
  1199.  
  1200.    8. Run your project to see the kitchen demo. 
  1201.  
  1202.  
  1203. ΓòÉΓòÉΓòÉ 3.2.8. Using the Source Browser ΓòÉΓòÉΓòÉ
  1204.  
  1205.  
  1206. Suppose you wanted to change the color of the tabletop in your application. 
  1207. You can use the Watcom Browser to determine the code you will need to change. 
  1208. The Watcom Browser provides an easy way to examine the class definitions, 
  1209. member functions, and inheritance trees associated with your C++ code.  First, 
  1210. you need to instruct the compiler to emit Watcom Browser information. 
  1211.  
  1212.  
  1213. Figure 10. The Watcom Browser 
  1214.  
  1215.    1. Right click on FURNITU.CPP, then select Source options from the pop-up 
  1216.       menus.  Select C++ Compiler Switches from the sub-menu. 
  1217.  
  1218.    2. Go to the 
  1219.  
  1220.  
  1221.          6. Debugging Switches 
  1222.  
  1223.       category by selecting it from the drop-down list box or by scrolling 
  1224.       through the categories using the >> button. 
  1225.  
  1226.    3. Select Emit Browser information [-db] and click on OK. 
  1227.  
  1228.    4. Click the "Make all targets in the project" icon to re-make the project. 
  1229.       The compiler will emit Browser information for FURNITU.CPP in a file 
  1230.       called DRAW???.DBR.  Now you are ready to browse the target's source. 
  1231.  
  1232.    5. Pull down the Targets menu and select Browse, or click the "Browse the 
  1233.       current target" icon on the toolbar.  The inheritance tree for the target 
  1234.       is displayed. 
  1235.  
  1236.    6. To view details on any particular class, double-click on the item for 
  1237.       information such as the location of the class definition, the private, 
  1238.       public, and protected functions of the class, and the class inheritance. 
  1239.       Branches of the inheritance tree can be collapsed and expanded.  A 
  1240.       variety of tools are available to help you navigate your C++ source. 
  1241.       Double-click on the table class. 
  1242.  
  1243.    7. Double-click on the function top_and_four_legs() to see the details on 
  1244.       this function. 
  1245.  
  1246.    8. Select the variable tabletop, pull down the Detail menu, and select the 
  1247.       Goto Definition...  item.  The Editor is invoked, loading the file 
  1248.       FURNITU.CPP which contains the definition of top_and_four_legs. 
  1249.  
  1250.    9. Next we will make some changes to FURNITU.CPP in order to change the 
  1251.       color of the tabletop.  Scroll down to line 132 using the keyboard or 
  1252.       mouse, or pull down the Edit menu, select Goto Line..., and enter 132. 
  1253.  
  1254.   10. Replace the line 
  1255.  
  1256.  
  1257.          tabletop->rgb(0,255,255); 
  1258.  
  1259.       with 
  1260.  
  1261.  
  1262.          tabletop->black(); 
  1263.  
  1264.   11. Save your changes by clicking on the "Write the current file to disk" 
  1265.       icon or selecting Save from the File menu. 
  1266.  
  1267.   12. Shut down the Browser before re-making the project. 
  1268.  
  1269.   13. Return to the IDE (by clicking on it if it is visible on your screen, or 
  1270.       by using Alt-Tab). 
  1271.  
  1272.   14. Click the "Make all targets in the project" icon to re-make the project. 
  1273.  
  1274.  
  1275. ΓòÉΓòÉΓòÉ 3.2.9. Correcting an Error ΓòÉΓòÉΓòÉ
  1276.  
  1277.  
  1278. An error is encountered during the make and error message(s) appear in the log 
  1279. window.  Additional information on the error is available by selecting the 
  1280. error, pulling down the Log menu and selecting the Help on Message item. 
  1281.  
  1282.    1. Double-click on the error message 
  1283.  
  1284.  
  1285.          furnitu.cpp (132): Error! E029: (col 15) symbol 'black' has not been 
  1286.       declared. 
  1287.  
  1288.       The offending source file ( FURNITU.CPP) is loaded into the Editor and 
  1289.       the cursor is positioned at the line which caused the error.  Apparently, 
  1290.       black has not been defined as a color. 
  1291.  
  1292.    2. Restart the Browser. 
  1293.  
  1294.    3. Double-click on color in the Inheritance window to see the member 
  1295.       functions of the class color.  Among our choices are blue(), green(), and 
  1296.       red(). 
  1297.  
  1298.    4. Press the Alt-Tab key combination to return to the Editor and replace the 
  1299.       line 
  1300.  
  1301.  
  1302.          tabletop->black(); 
  1303.  
  1304.       with 
  1305.  
  1306.  
  1307.          tabletop->red(); 
  1308.  
  1309.    5. Save your changes. 
  1310.  
  1311.    6. Return to the IDE and re-make the project. 
  1312.  
  1313.    7. Run the program to see the changes you have made to the tabletop. 
  1314.  
  1315.  
  1316. ΓòÉΓòÉΓòÉ 3.2.10. Editing a Bitmap ΓòÉΓòÉΓòÉ
  1317.  
  1318.  
  1319. You can edit bitmaps, icons, or cursors associated with your project using 
  1320. Watcom's Image Editor.  Double-click on a file with a .BMP, .ICO, or .CUR 
  1321. extension and the file is loaded into the Image Editor.  The editor has many 
  1322. features to design your images, including resizing, rotation, shifting, and a 
  1323. utility to take a "snapshot" of another image and import it. 
  1324.  
  1325.  
  1326. Figure 11. The Watcom Image Editor 
  1327.  
  1328. Suppose you wanted to change the color of the right-arrow icon in your 
  1329. application. 
  1330.  
  1331.    1. If the "Folder" icon next to .BMP is closed, click on it to restore all 
  1332.       the files with a .BMP extension to the file list. 
  1333.  
  1334.    2. Scroll the window until the file RIGHT.BMP is visible. 
  1335.  
  1336.    3. Double-click on RIGHT.BMP in the DRAW???.EXE target window. 
  1337.  
  1338.    4. Select the "Paint Can" icon from the Tool Palette. 
  1339.  
  1340.    5. Select a color from the Color Palette. 
  1341.  
  1342.    6. Click on the arrow. 
  1343.  
  1344.    7. Save your changes using the "Save" icon on the toolbar and exit the Image 
  1345.       Editor. 
  1346.  
  1347.    8. Click the "Make all targets in the project" icon to rebuild the project 
  1348.       with the change incorporated. 
  1349.  
  1350.  
  1351. ΓòÉΓòÉΓòÉ 3.2.11. Editing Menus ΓòÉΓòÉΓòÉ
  1352.  
  1353.  
  1354. Next, you will add source files to the list of items that make up DRAW???.EXE. 
  1355.  
  1356.    1. Pull down the Sources menu and select the New Source...  item. 
  1357.  
  1358.       Note: 
  1359.                 You can do this either by choosing from the menu bar or by 
  1360.                 positioning the mouse over the file list area and clicking the 
  1361.                 right mouse button.  The IDE displays a pop-up menu from which 
  1362.                 you can choose the desired action. 
  1363.  
  1364.    2. Enter the filename DRAW.RES (or DRAWOS2.RES for OS/2).  For OS/2, click 
  1365.       OK when you have entered the source file name.  For all other systems, 
  1366.       click on Add when you have entered the source file name and then click on 
  1367.       Close.  Now we will remove the .RC file from the project so that our 
  1368.       changes to the .RES file will not be overwritten.  When an .RC file is 
  1369.       present, the .RES file is generated from the .RC file. 
  1370.  
  1371.    3. Right click on DRAW.RC (or DRAWOS2.RC for OS/2), then select Remove 
  1372.       Source from the pop-up menu. 
  1373.  
  1374.    4. Double-click on DRAW.RES (or DRAWOS2.RES).  The Resource Editor is 
  1375.       invoked, displaying all the available resources (in this case, icons, 
  1376.       bitmaps, and menus). 
  1377.  
  1378.  
  1379.       Figure 12. The Watcom Resource Editor 
  1380.  
  1381.    5. Click on "Menu Resources". 
  1382.  
  1383.    6. Double-click on "DrawMenu" in the right-hand box.  This will bring up the 
  1384.       Menu Editor.  The Menu Editor displays the menus defined for the resource 
  1385.       DrawMenu.  You can specify pop-up menus, menu items and sub-items, text, 
  1386.       separators, attributes, break styles, and memory flags. 
  1387.  
  1388.  
  1389.       Figure 13. The Watcom Menu Editor 
  1390.  
  1391.    7. Click on MENUITEM "&Dimmer" in the item list window. 
  1392.  
  1393.    8. In the "Item Text" window change the item to &Darker and then click on 
  1394.       the "Change" button. 
  1395.  
  1396.    9. Select Update from the File menu or click on the "Update the file with 
  1397.       this menu" icon. 
  1398.  
  1399.   10. Exit the Menu Editor. 
  1400.  
  1401.   11. Now, select Save from the File menu or click on the "Save this file" icon 
  1402.       and exit the Resource Editor. 
  1403.  
  1404.   12. Click the "Make all targets in the project" icon to re-make the project. 
  1405.  
  1406.  
  1407. ΓòÉΓòÉΓòÉ 3.2.12. Sampling and Profiling an Executable ΓòÉΓòÉΓòÉ
  1408.  
  1409.  
  1410. Together, the Watcom Execution Sampler and the Watcom Execution Profiler allow 
  1411. you to pinpoint the areas of your code that are the most heavily used, 
  1412. indicating possible candidates for performance improvements. 
  1413.  
  1414.    1. Click on the DRAW???.EXE target. 
  1415.  
  1416.    2. Select the Sample item from the Targets menu item, or click on the "Run 
  1417.       and sample the current target" icon from the toolbar.  The Watcom 
  1418.       Execution Sampler is invoked and your application begins to execute. 
  1419.  
  1420.    3. Try rotating and resizing the image a few times.  The sampler takes a 
  1421.       "snapshot" of the code that is being executed at regular intervals.  Exit 
  1422.       the application.  A samples file with extension .SMP is created in the 
  1423.       current directory.  This file is input for the profiler. 
  1424.  
  1425.    4. You are now ready to profile the executable.  Do this by selecting 
  1426.       Profile from the Targets menu, or by clicking on the "Profile the current 
  1427.       target" icon on the toolbar.  The profiler scans the .SMP file and 
  1428.       reports the activity in the various modules of the application.  The 
  1429.       percentage of time spent in the modules is indicated as an absolute 
  1430.       percentage (percent of total samples) and as a relative percentage 
  1431.       (percent of samples in the .EXE image). 
  1432.  
  1433.    5. Double-click on the module or routine names to step down to the exact 
  1434.       source being executed when a sample was taken.  For more details, you can 
  1435.       adjust the sampling rate of the Sampler to get a better picture of your 
  1436.       code.  To do this, exit the Profiler, pull down the Targets menu, and 
  1437.       select Target options, then Sample Switches...  from the pop-up menus. 
  1438.       Specify a sampling rate such as 2 (for 2 milliseconds), click on OK, then 
  1439.       run the Sampler and Profiler again. 
  1440.  
  1441.  
  1442.  Figure 14. The Watcom Execution Profiler 
  1443.  
  1444.  
  1445. ΓòÉΓòÉΓòÉ 3.2.13. Saving the Project and Terminating the Session ΓòÉΓòÉΓòÉ
  1446.  
  1447.  
  1448. You can now exit the IDE session by selecting Exit from the File menu.  If you 
  1449. have not already saved your project, you will be prompted to do so.  Choose 
  1450. "Yes" and the session ends. 
  1451.  
  1452.  
  1453. ΓòÉΓòÉΓòÉ 3.3. Tutorial Review ΓòÉΓòÉΓòÉ
  1454.  
  1455.  
  1456. In this tutorial, you created a project called KITCHEN.WPJ, which was composed 
  1457. of two targets:  DRAW???.EXE and BUTTON.LIB.  You compiled and linked it into 
  1458. an executable program using the WMAKE utility, the Watcom C and C++ compilers, 
  1459. and the Watcom Linker.  You executed it both directly and under the control of 
  1460. the Watcom Debugger..  You browsed the source, and made changes using the text 
  1461. and resource editors.  Finally, you sampled and profiled the application. 
  1462.  
  1463. When you saved the project, you created the following permanent files: 
  1464.  
  1465.      KITCHEN.WPJ - describes the screen layout and refers to the target files 
  1466.       called DRAW???.TGT and BUTTON.TGT. 
  1467.      DRAW???.TGT - describes the target executable DRAW???.EXE and all 
  1468.       switches required to link it.  It also describes the .C and .CPP files 
  1469.       and switches required to compile them. 
  1470.      BUTTON.TGT - describes the target library and all switches required to 
  1471.       create it.  It also describes the .C file and the switches used to build 
  1472.       the library. 
  1473.  
  1474.  
  1475. ΓòÉΓòÉΓòÉ 4. Documentation ΓòÉΓòÉΓòÉ
  1476.  
  1477.  
  1478. The following manuals comprise the Watcom C/C++ documentation set.  Printed 
  1479. copies of this documentation can be ordered from Watcom.  When you install the 
  1480. software, portions of the documentation set are provided as on-line help files. 
  1481. Subsequent sections describe how to access this on-line help. 
  1482.  
  1483. The following describes the titles in the Watcom C/C++ documentation set. 
  1484.  
  1485.  Watcom C/C++ User's Guide 
  1486.       This manual describes how to use Watcom C/C++.  It contains an 
  1487.       introduction to the compiler and a tutorial section.  It also describes 
  1488.       compiler options, precompiled header files, libraries, memory models, 
  1489.       calling conventions, pragmas, in-line assembly, ROM based applications, 
  1490.       and environment variables. 
  1491.  
  1492.  Watcom C/C++ Tools User's Guide 
  1493.       This manual describes the command line oriented tools including the 
  1494.       compile and link utility, library manager, object file disassembler, far 
  1495.       call optimization tool, assembler, patch utility, strip utility, make 
  1496.       utility, and touch utility. 
  1497.  
  1498.  Watcom Graphical Tools User's Guide 
  1499.       This manual describes Watcom's Windows and OS/2 graphical tools including 
  1500.       the Integrated Development Environment, Browser, Dr.  Watcom, Spy, DDE 
  1501.       Spy, Image Editor, Resource Editor, Sampler/Profiler, Resource Compiler, 
  1502.       Heap Walker, Zoom, and Editor. 
  1503.  
  1504.  Watcom C/C++ Programmer's Guide 
  1505.       This manual includes 5 major sections each of which describes operating 
  1506.       system specific development issues.  The operating systems covered 
  1507.       include extended DOS, OS/2, Windows 3.x, Windows NT/Win32s, 32-bit 
  1508.       Windows 3.x (using Watcom's Supervisor technology), AutoCAD ADS and 
  1509.       Novell NLMs.  Topics include creating a sample program, operating system 
  1510.       specific error messages, and debugging techniques. 
  1511.  
  1512.  Watcom C Language Reference 
  1513.       This manual describes the ANSI C programming language and extensions 
  1514.       which are supported by Watcom C. 
  1515.  
  1516.  Watcom C Library Reference, Volumes 1 and 2 
  1517.       These manuals describe the C and graphics libraries supported by Watcom 
  1518.       C/C++. 
  1519.  
  1520.  Watcom C++ Class Library Reference 
  1521.       This manual provides a comprehensive reference to the C++ class libraries 
  1522.       provided with Watcom C/C++. 
  1523.  
  1524.  Watcom Debugger User's Guide 
  1525.       This manual describes the Watcom Debugger and discusses advanced 
  1526.       debugging techniques. 
  1527.  
  1528.  Watcom Linker User's Guide 
  1529.       This manual describes how to use the Watcom Linker to generate 
  1530.       executables for target systems such as extended DOS, Windows 3.x, Windows 
  1531.       95, Windows NT, OS/2, and Novell NLMs. 
  1532.  
  1533.  Visual Programmer User's Guide 
  1534.       This manual describes how to use Blue Sky's Visual Programmer, an easy to 
  1535.       use Prototyper and C/C++ Code Generator for Windows, Win32 and Windows 
  1536.       NT. 
  1537.  
  1538.  MFC Switch-It Module User's Guide 
  1539.       Blue Sky's MFC Switch-It Module (SIM) allows you to generate Microsoft 
  1540.       Foundation Classes (MFC) C++ code for your application design(s).  You 
  1541.       prototype and test your application using Visual Programmer, then 
  1542.       generate the code using the MFC SIM. 
  1543.  
  1544.  The following book is included in the printed documentation set.  It is not 
  1545.  available as an on-line document. 
  1546.  
  1547.  The C++ Programming Language by Bjarne Stroustrup 
  1548.       This book is an industry recognized authoritative standard on C++ 
  1549.       programming.  This manual begins with a tutorial to introduce the C++ 
  1550.       concepts.  The second section consists of an in-depth C++ reference 
  1551.       guide. 
  1552.  
  1553.  
  1554. ΓòÉΓòÉΓòÉ 4.1. Accessing On-line Documentation ΓòÉΓòÉΓòÉ
  1555.  
  1556.  
  1557. The following sections describe how to access the on-line help that is 
  1558. available for DOS, Windows 3.x, Windows 95, Windows NT and OS/2. 
  1559.  
  1560.  
  1561. ΓòÉΓòÉΓòÉ 4.1.1. On-line Documentation under DOS ΓòÉΓòÉΓòÉ
  1562.  
  1563.  
  1564. The Watcom Help program, WHELP, may be used under DOS to access on-line 
  1565. documentation.  The Watcom Help command line syntax is: 
  1566.  
  1567.  
  1568.    WHELP help_file [topic_name] 
  1569.  
  1570. Notes: 
  1571.  
  1572.    1. If help_file is specified without an extension then ".IHP" is assumed. 
  1573.  
  1574.    2. The topic_name parameter is optional. 
  1575.  
  1576.    3. If topic_name is not specified, the default topic is "Table of Contents". 
  1577.  
  1578.    4. If topic_name contains spaces then it must be enclosed in quotes. 
  1579.  
  1580.  The following help files are available: 
  1581.  
  1582.  CGUIDE 
  1583.        Watcom C/C++ User's Guide (excludes C and C++ Diagnostic Messages 
  1584.       appendices which are available as separate help files) 
  1585.  
  1586.  CLIB 
  1587.        Watcom C Library Reference 
  1588.  
  1589.  CLR 
  1590.        Watcom C Language Reference 
  1591.  
  1592.  CMIX 
  1593.        Watcom C/C++ Master Index 
  1594.  
  1595.  CPPLIB 
  1596.        Watcom C++ Class Library Reference 
  1597.  
  1598.  ISVCPP 
  1599.        Watcom C/C++ 11.0 Add-In Tools Guide 
  1600.  
  1601.  LGUIDE 
  1602.        Watcom Linker User's Guide 
  1603.  
  1604.  PGUIDE 
  1605.        Watcom C/C++ Programmer's Guide 
  1606.  
  1607.  C_README 
  1608.        Watcom C/C++ Getting Started manual 
  1609.  
  1610.  RESCOMP 
  1611.       Documentation for the Watcom Resource Compiler for Windows (excerpt from 
  1612.       the Watcom Graphical Tools User's Guide) 
  1613.  
  1614.  TOOLS 
  1615.        Watcom C/C++ Tools User's Guide 
  1616.  
  1617.  WD 
  1618.        Watcom Debugger User's Guide 
  1619.  
  1620.  WPROF 
  1621.       Documentation for the Watcom Execution Sampler and Watcom Execution 
  1622.       Profiler (excerpt from the Watcom Graphical Tools User's Guide) 
  1623.  
  1624.  WCCERRS 
  1625.       Documentation for the Watcom C Diagnostic Messages (excerpt from the 
  1626.       Watcom C/C++ User's Guide). 
  1627.  
  1628.  WPPERRS 
  1629.       Documentation for the Watcom C++ Diagnostic Messages (excerpt from the 
  1630.       Watcom C/C++ User's Guide). 
  1631.  
  1632.  
  1633. ΓòÉΓòÉΓòÉ 4.1.2. On-line Documentation under Windows 3.x, 95 and NT ΓòÉΓòÉΓòÉ
  1634.  
  1635.  
  1636. On-line documentation is presented in the form of Windows Help files (".HLP" 
  1637. files).  When the software is installed under Windows 3.x, Windows 95 or 
  1638. Windows NT, a number of program groups are created.  You can access the on-line 
  1639. document by opening a program group and double-clicking on a help icon. 
  1640.  
  1641.  Watcom C/C++ Group 
  1642.  
  1643.  Getting Started 
  1644.        Watcom C/C++ Getting Started 
  1645.  
  1646.  Watcom C/C++ Tools Help Group 
  1647.  
  1648.  Accelerator Editor Help 
  1649.       Documentation for the Accelerator Editor (excerpt from the Watcom 
  1650.       Graphical Tools User's Guide) 
  1651.  
  1652.  C Error Messages 
  1653.       Documentation for the Watcom C Diagnostic Messages (excerpt from the 
  1654.       Watcom C/C++ User's Guide) 
  1655.  
  1656.  C++ Error Messages 
  1657.       Documentation for the Watcom C++ Diagnostic Messages (excerpt from the 
  1658.       Watcom C/C++ User's Guide) 
  1659.  
  1660.  C Language Reference 
  1661.        Watcom C Language Reference 
  1662.  
  1663.  C Library Reference 
  1664.        Watcom C Library Reference 
  1665.  
  1666.  C++ Library Reference 
  1667.        Watcom C++ Class Library Reference 
  1668.  
  1669.  C/C++ Master Index 
  1670.       The master index for all of the Watcom C/C++ on-line help 
  1671.  
  1672.  DDE Spy Help 
  1673.       Documentation for the DDE Spy utility (excerpt from the Watcom Graphical 
  1674.       Tools User's Guide) 
  1675.  
  1676.  Debugger Help 
  1677.        Watcom Debugger User's Guide 
  1678.  
  1679.  Dialog Editor Help 
  1680.       Documentation for the Dialogue Editor (excerpt from the Watcom Graphical 
  1681.       Tools User's Guide) 
  1682.  
  1683.  Dr.  Watcom Help 
  1684.       Documentation for Dr.  Watcom (excerpt from the Watcom Graphical Tools 
  1685.       User's Guide) 
  1686.  
  1687.  Editor Help 
  1688.       Documentation for the Watcom Editor (excerpt from the Watcom Graphical 
  1689.       Tools User's Guide) 
  1690.  
  1691.  Heap Walker Help 
  1692.       Documentation for the Heap Walker utility (excerpt from the Watcom 
  1693.       Graphical Tools User's Guide) 
  1694.  
  1695.  IDE Help 
  1696.       Documentation for the Interactive Development Environment (excerpt from 
  1697.       the Watcom Graphical Tools User's Guide) 
  1698.  
  1699.  Image Editor Help 
  1700.       Documentation for the Image Editor (excerpt from the Watcom Graphical 
  1701.       Tools User's Guide) 
  1702.  
  1703.  Linker Guide 
  1704.        Watcom Linker User's Guide 
  1705.  
  1706.  Menu Editor Help 
  1707.       Documentation for the Menu Editor (excerpt from the Watcom Graphical 
  1708.       Tools User's Guide) 
  1709.  
  1710.  Profiler Help 
  1711.       Documentation for the Watcom Execution Sampler and Watcom Execution 
  1712.       Profiler (excerpt from the Watcom Graphical Tools User's Guide) 
  1713.  
  1714.  Programmer's Guide 
  1715.        Watcom C/C++ Programmer's Guide 
  1716.  
  1717.  Resource Compiler Help 
  1718.       Documentation for the Resource Compiler (excerpt from the Watcom 
  1719.       Graphical Tools User's Guide) 
  1720.  
  1721.  Resource Editor Help 
  1722.       Documentation for the Resource Editor (excerpt from the Watcom Graphical 
  1723.       Tools User's Guide) 
  1724.  
  1725.  Source Browser Help 
  1726.       Documentation for the Browser (excerpt from the Watcom Graphical Tools 
  1727.       User's Guide) 
  1728.  
  1729.  Spy Help 
  1730.       Documentation for the Spy utility (excerpt from the Watcom Graphical 
  1731.       Tools User's Guide) 
  1732.  
  1733.  String Editor Help 
  1734.       Documentation for the String Editor (excerpt from the Watcom Graphical 
  1735.       Tools User's Guide) 
  1736.  
  1737.  Tools Guide 
  1738.        Watcom C/C++ Tools User's Guide 
  1739.  
  1740.  User's Guide 
  1741.        Watcom C/C++ User's Guide (excludes C and C++ Diagnostic Messages 
  1742.       appendices which are available as separate help files) 
  1743.  
  1744.  Visual Programmer Help 
  1745.        Visual Programmer User's Guide 
  1746.  
  1747.  Visual Programmer MFC Help 
  1748.        MFC Switch-it Module User's Guide 
  1749.  
  1750.  Zoom Help 
  1751.       Documentation for the Zoom utility (excerpt from the Watcom Graphical 
  1752.       Tools User's Guide) 
  1753.  
  1754.  The second set of help files, listed below, forms part of the Microsoft 
  1755.  Windows SDK. 
  1756.  
  1757.  Watcom C/C++ Additional Help Group 
  1758.  
  1759.  Add-In Tools Guide 
  1760.       A guide to third-party software tools/libraries 
  1761.  
  1762.  Hotspot Editor Help 
  1763.  
  1764.  MCI Command Strings 
  1765.  
  1766.  MFC 4.1 Library Help 
  1767.  
  1768.  MFC 4.1 Sample Program Help 
  1769.  
  1770.  MFC 4.1 Technical Notes 
  1771.  
  1772.  MFC 2.52b Library Help 
  1773.  
  1774.  MFC 2.52b Sample Program Help 
  1775.  
  1776.  MFC 2.52b Technical Notes 
  1777.  
  1778.  Multimedia Reference 
  1779.  
  1780.  Pen API Reference 
  1781.  
  1782.  Win32 API Help 
  1783.  
  1784.  Windows API Reference 
  1785.  
  1786.  
  1787. ΓòÉΓòÉΓòÉ 4.1.3. On-line Documentation under OS/2 ΓòÉΓòÉΓòÉ
  1788.  
  1789.  
  1790. On-line documentation is presented in the form of OS/2 Information files 
  1791. (".INF" files).  When the software is installed under OS/2, the Watcom C/C++ 
  1792. folder is created.  You can access the on-line document by opening the Watcom 
  1793. C/C++ folder and double-clicking on a help icon. 
  1794.  
  1795.  C Error Messages 
  1796.       Documentation for the C Diagnostic Messages (excerpt from the Watcom 
  1797.       C/C++ User's Guide) 
  1798.  
  1799.  C++ Error Messages 
  1800.       Documentation for the C++ Diagnostic Messages (excerpt from the Watcom 
  1801.       C/C++ User's Guide) 
  1802.  
  1803.  C Language Reference 
  1804.        Watcom C Language Reference 
  1805.  
  1806.  C Library Reference 
  1807.        Watcom C Library Reference 
  1808.  
  1809.  C++ Library Reference 
  1810.        Watcom C++ Class Library Reference 
  1811.  
  1812.  C/C++ Master Index 
  1813.       The master index for all of the Watcom C/C++ on-line help 
  1814.  
  1815.  CP Reference 
  1816.       OS/2 Control Program Reference 
  1817.  
  1818.  Debugger Help 
  1819.        Watcom Debugger User's Guide 
  1820.  
  1821.  Getting Started 
  1822.        Watcom C/C++ Getting Started 
  1823.  
  1824.  IDE Help 
  1825.       Documentation for the Interactive Development Environment (excerpt from 
  1826.       the Watcom Graphical Tools User's Guide) 
  1827.  
  1828.  IPFC Reference 
  1829.       OS/2 IPF Compiler Reference 
  1830.  
  1831.  Linker Guide 
  1832.        Watcom Linker User's Guide 
  1833.  
  1834.  PM Reference 
  1835.       OS/2 Presentation Manager Reference 
  1836.  
  1837.  Profiler Help 
  1838.       Documentation for the Watcom Execution Sampler and Watcom Execution 
  1839.       Profiler (excerpt from the Watcom Graphical Tools User's Guide) 
  1840.  
  1841.  Programmer's Guide 
  1842.        Watcom C/C++ Programmer's Guide 
  1843.  
  1844.  REXX Reference 
  1845.       OS/2 REXX Reference 
  1846.  
  1847.  SOM Reference 
  1848.       OS/2 System Object Model Reference 
  1849.  
  1850.  Source Browser Help 
  1851.       Documentation for the Watcom Browser (excerpt from the Watcom Graphical 
  1852.       Tools User's Guide) 
  1853.  
  1854.  Tools Guide 
  1855.        Watcom C/C++ Tools User's Guide 
  1856.  
  1857.  Tools Reference 
  1858.       OS/2 Toolkit Reference 
  1859.  
  1860.  User's Guide 
  1861.        Watcom C/C++ User's Guide (excludes C and C++ Diagnostic Messages 
  1862.       appendices which are available as separate help files) 
  1863.  
  1864.  
  1865. ΓòÉΓòÉΓòÉ 5. Microsoft Foundation Classes ΓòÉΓòÉΓòÉ
  1866.  
  1867.  
  1868. Two versions of MFC are included in this release of the compiler.  Use version 
  1869. MFC 4.1 to create 32-bit applications.  Use version MFC 2.52b to create 16-bit 
  1870. applications.  MFC help is available by clicking on the MFC help icon in the 
  1871. Watcom C/C++ folder.  MFC programs will not run under the Watcom 32-bit Windows 
  1872. Extender. 
  1873.  
  1874.  
  1875. ΓòÉΓòÉΓòÉ 5.1. MFC 4.1 ΓòÉΓòÉΓòÉ
  1876.  
  1877.  
  1878. MFC 4.1 is used to create 32-bit MFC applications that run under the Win32 API 
  1879. (Windows NT, Windows 95) and Win32s.  There is a batch file that creates the 
  1880. MFC 4.1 sample programs. 
  1881.  
  1882.  
  1883.    C:\WATCOM\SAMPLES\MFC\V41\MKSAMPLE.BAT 
  1884.  
  1885.  
  1886. ΓòÉΓòÉΓòÉ 5.2. MFC 2.52b ΓòÉΓòÉΓòÉ
  1887.  
  1888.  
  1889. MFC 2.52b is used to create 16-bit MFC applications that run under the Windows 
  1890. API.  There is a batch file that creates the MFC 2.52b sample programs. 
  1891.  
  1892.  
  1893.    C:\WATCOM\SAMPLES\MFC\V252\MKSAMPLE.BAT 
  1894.  
  1895.  
  1896. ΓòÉΓòÉΓòÉ 5.3. Debugging MFC Applications ΓòÉΓòÉΓòÉ
  1897.  
  1898.  
  1899. Watcom C/C++ contains compiled libraries for MFC.  For each library that is 
  1900. included, there is a production library and a "DEBUG" library.  The debug 
  1901. library usually has the same name as the production library but with a "D" 
  1902. suffix on the file name.  For example, NRFXCC.LIB and NRFXCCD.LIB are the 
  1903. production and debug versions of one of the libraries included in the package. 
  1904. The debug library is compiled with line number debugging information ("d1") and 
  1905. with debugging "assertions" enabled. 
  1906.  
  1907. If you wish to have a version of the library that contains "d2" type debugging 
  1908. information then you must recompiled the MFC source code that is provided. 
  1909. Makefiles tailored for Watcom C++ are provided for building the MFC libraries. 
  1910.  
  1911. To debug an MFC application, you must ensure the following: 
  1912.  
  1913.    1. The debug libraries must be installed. 
  1914.  
  1915.    2. If you want to see the MFC source code when debugging an MFC function, 
  1916.       you must have installed the source code. You must also use the debugger's 
  1917.       "set source path" to set the source path explicitly in the debugger for 
  1918.       the MFC source (when using libraries that were compiled by Watcom). 
  1919.  
  1920.    3. If you want to use the Watcom Browser to see MFC classes, you must select 
  1921.       the Watcom C++ "db" option when compiling your source code. 
  1922.  
  1923.  Please note that if you wish to profile the execution of you MFC application 
  1924.  with the Watcom Execution Profiler, you will not be able to drill down to MFC 
  1925.  library source code unless you have recompiled the source code on your own 
  1926.  system. 
  1927.  
  1928.  
  1929. ΓòÉΓòÉΓòÉ 6. SOMobjects Developer Toolkit ΓòÉΓòÉΓòÉ
  1930.  
  1931.  
  1932. Watcom C/C++ contains the SOMobjects Developer Toolkit for OS/2.  This toolkit 
  1933. allows for the creation of applications that use IBM's System Object Model 
  1934. (SOM).  SOM is a set of libraries, utilities and conventions used to create 
  1935. binary class libraries. 
  1936.  
  1937. A number of sample programs are provided with the SOMobjects Developer Toolkit 
  1938. for OS/2.  These samples are located in the SOM\SAMPLES directory of the 
  1939. directory in which you installed the software.  Each sample directory contains 
  1940. a "readme" file which describes the procedures you should follow to create and 
  1941. run these samples.  Please read this file before attempting to create or run 
  1942. any of the sample programs. 
  1943.  
  1944. The SOMobjects Developer Toolkit Publication is a complete set of manuals that 
  1945. describes SOM and the tools that support its use.  This publication is 
  1946. available from IBM and includes the following: 
  1947.  
  1948.      User's Guide 
  1949.      Programmer's Reference 
  1950.      Quick Reference 
  1951.      Collection Classes Reference 
  1952.      Emitter Guide and Reference 
  1953.      Installation/Configuration Instructions 
  1954.  
  1955.  The SOMobjects Developer Toolkit for Windows is not included in Watcom C/C++ 
  1956.  version 11.0. 
  1957.  
  1958.  
  1959. ΓòÉΓòÉΓòÉ 7. Benchmarking Hints ΓòÉΓòÉΓòÉ
  1960.  
  1961.  
  1962. The Watcom C/C++ compiler contains many options for controlling the code to be 
  1963. produced.  It is impossible to have a certain set of compiler options that will 
  1964. produce the absolute fastest execution times for all possible applications. 
  1965. With that said, we will list the compiler options that we think will give the 
  1966. best execution times for most applications.  You may have to experiment with 
  1967. different options to see which combination of options generates the fastest 
  1968. code for your particular application. 
  1969.  
  1970. The recommended options for generating the fastest 16-bit Intel code are: 
  1971.  
  1972.  Pentium Pro 
  1973.       /oneatx /oh /oi+ /ei /zp8 /6 /fpi87 /fp6 
  1974.  
  1975.  Pentium 
  1976.       /oneatx /oh /oi+ /ei /zp8 /5 /fpi87 /fp5 
  1977.  
  1978.  486 
  1979.       /oneatx /oh /oi+ /ei /zp8 /4 /fpi87 /fp3 
  1980.  
  1981.  386 
  1982.       /oneatx /oh /oi+ /ei /zp8 /3 /fpi87 /fp3 
  1983.  
  1984.  286 
  1985.       /oneatx /oh /oi+ /ei /zp8 /2 /fpi87 /fp2 
  1986.  
  1987.  186 
  1988.       /oneatx /oh /oi+ /ei /zp8 /1 /fpi87 
  1989.  
  1990.  8086 
  1991.       /oneatx /oh /oi+ /ei /zp8 /0 /fpi87 
  1992.  
  1993.  The recommended options for generating the fastest 32-bit Intel code are: 
  1994.  
  1995.  Pentium Pro 
  1996.       /oneatx /oh /oi+ /ei /zp8 /6 /fp6 
  1997.  
  1998.  Pentium 
  1999.       /oneatx /oh /oi+ /ei /zp8 /5 /fp5 
  2000.  
  2001.  486 
  2002.       /oneatx /oh /oi+ /ei /zp8 /4 /fp3 
  2003.  
  2004.  386 
  2005.       /oneatx /oh /oi+ /ei /zp8 /3 /fp3 
  2006.  
  2007.  The "oi+" option is for C++ only.  Under some circumstances, the "ob" and 
  2008.  "ol+" optimizations may also give better performance with 32-bit Intel code. 
  2009.  
  2010.  Option "on" causes the compiler to replace floating-point divisions with 
  2011.  multiplications by the reciprocal. This generates faster code (multiplication 
  2012.  is faster than division), but the result may not be the same because the 
  2013.  reciprocal may not be exactly representable. 
  2014.  
  2015.  Option "oe" causes small user written functions to be expanded in-line rather 
  2016.  than generating a call to the function.  Expanding functions in-line can 
  2017.  further expose other optimizations that couldn't otherwise be detected if a 
  2018.  call was generated to the function. 
  2019.  
  2020.  Option "oa" causes the compiler to relax alias checking. 
  2021.  
  2022.  Option "ot" must be specified to cause the code generator to select code 
  2023.  sequences which are faster without any regard to the size of the code.  The 
  2024.  default is to select code sequences which strike a balance between size and 
  2025.  speed. 
  2026.  
  2027.  Option "ox" is equivalent to "obiklmr" and "s" which causes the compiler/code 
  2028.  generator to do branch prediction ("ob"), expand intrinsic functions in-line 
  2029.  ("oi"), enable control flow prologues and epilogues ("ok"), perform loop 
  2030.  optimizations ("ol"), generate 387 instructions in-line for math functions 
  2031.  such as sin, cos, sqrt ("om"), reorder instructions to avoid pipeline stalls 
  2032.  ("or"), and to not generate any stack overflow checking ("s").  Option "or" is 
  2033.  very important for generating fast code for the Pentium and Pentium Pro 
  2034.  processors. 
  2035.  
  2036.  Option "oh" causes the compiler to attempt repeated optimizations (which can 
  2037.  result in longer compiles but more optimal code). 
  2038.  
  2039.  Option "oi+" causes the C++ compiler to expand intrinsic functions in-line 
  2040.  (just like "oi") but also sets the inline_depth to its maximum (255).  By 
  2041.  default, inline_depth is 3.  The inline_depth can also be changed by using the 
  2042.  C++ inline_depth pragma. 
  2043.  
  2044.  Option "ei" causes the compiler to allocate at least an "int" for all 
  2045.  enumerated types. 
  2046.  
  2047.  Option "zp8" causes all data to be aligned on 8 byte boundaries.  The default 
  2048.  is "zp2" for the 16-bit compiler and "zp8" for 32-bit compiler.  If, for 
  2049.  example, "zp1" packing was specified then this would pack all data which would 
  2050.  reduce the amount of data memory required but would require extra clock cycles 
  2051.  to access data that is not on an appropriate boundary. 
  2052.  
  2053.  Options "0", "1", "2", "3", "4", "5" and "6" emit Intel code sequences 
  2054.  optimized for processor-specific instruction set features and timings.  For 
  2055.  16-bit Intel applications, the use of these options may limit the range of 
  2056.  systems on which the application will run but there are execution performance 
  2057.  improvements. 
  2058.  
  2059.  Options "fp2", "fp3", "fp5" and "fp6" emit Intel floating-point operations 
  2060.  targetted at specific features of the math coprocessor in the Intel series. 
  2061.  For 16-bit Intel applications, the use of these options may limit the range of 
  2062.  systems on which the application will run but there are execution performance 
  2063.  improvements. 
  2064.  
  2065.  Option "fpi87" causes in-line Intel 80x87 numeric data processor instructions 
  2066.  to be generated into the object code for floating-point operations. 
  2067.  Floating-point instruction emulation is not included so as to obtain the best 
  2068.  floating-point performance in 16-bit Intel applications. 
  2069.  
  2070.  For 32-bit Intel applications, the use of the "fp5" option will give good 
  2071.  performance on the Intel Pentium but less than optimal performance on the 386 
  2072.  and 486.  The use of the "5" option will give good performance on the Pentium 
  2073.  and minimal, if any, impact on the 386 and 486.  Thus, the following set of 
  2074.  options gives good overall performance for the 386, 486 and Pentium 
  2075.  processors. 
  2076.  
  2077.     /oneatx /oh /oi+ /ei /zp8 /5 /fp3 
  2078.  
  2079.  
  2080. ΓòÉΓòÉΓòÉ 8. Additional Redistribution Rights ΓòÉΓòÉΓòÉ
  2081.  
  2082.  
  2083. Please read carefully the information in the following sections if you plan to 
  2084. distribute your application to others. 
  2085.  
  2086.  
  2087. ΓòÉΓòÉΓòÉ 8.1. Redistributable Components ΓòÉΓòÉΓòÉ
  2088.  
  2089.  
  2090. Subject to the terms and conditions of the Powersoft Language Products Software 
  2091. License Agreement, in addition to any Redistribution Rights granted therein, 
  2092. you are hereby granted a non-exclusive, royalty-free right to reproduce and 
  2093. distribute the Components specified below provided that (a) it is distributed 
  2094. as part of and only with your software product; (b) you not suppress, alter or 
  2095. remove proprietary rights notices contained therein; and (c) you indemnify, 
  2096. hold harmless and defend Powersoft and its suppliers from and against any 
  2097. claims or lawsuits, including attorney's fees, that arise or result from the 
  2098. use or distribution of your software product. 
  2099.  
  2100. The Tenberry Software (formerly Rational Systems, Inc.) and Watcom Components 
  2101. are: 
  2102.  
  2103.      DOS4GW.EXE Copyright C 1990-1994 Tenberry Software, Inc. 
  2104.      RMINFO.EXE Copyright C 1987-1993 Tenberry Software, Inc. 
  2105.      PMINFO.EXE Copyright C 1987-1993 Tenberry Software, Inc. 
  2106.      PRIVATXM.EXE Copyright C 1991 Tenberry Software, Inc. 
  2107.      DOS4GW.DOC Copyright C 1991-1995 Tenberry Software, Inc. 
  2108.      WEMU387.386 Copyright C 1991-1997 Sybase, Inc. 
  2109.  
  2110.  The Microsoft Components from the Microsoft Windows SDK version 3.1, all 
  2111.  Copyright C 1992 Microsoft Corporation, are: 
  2112.  
  2113.      COMMDLG.DLL 
  2114.      COMMDLG.DAN 
  2115.      COMMDLG.DUT 
  2116.      COMMDLG.FIN 
  2117.      COMMDLG.FRN 
  2118.      COMMDLG.GER 
  2119.      COMMDLG.ITN 
  2120.      COMMDLG.NOR 
  2121.      COMMDLG.POR 
  2122.      COMMDLG.SPA 
  2123.      COMMDLG.SWE 
  2124.      DDEML.DLL 
  2125.      LZEXPAND.DLL 
  2126.      OLECLI.DLL 
  2127.      OLESVR.DLL 
  2128.      PENWIN.DLL 
  2129.      SHELL.DLL 
  2130.      STRESS.DLL 
  2131.      TOOLHELP.DLL 
  2132.      VTD.386 
  2133.      VER.DLL 
  2134.      DIB.DRV 
  2135.      EXPAND.EXE 
  2136.      MARKMIDI.EXE 
  2137.      REGLOAD.EXE 
  2138.      WINHELP.EXE 
  2139.      WINHELP.HLP 
  2140.  
  2141.  
  2142. ΓòÉΓòÉΓòÉ 8.2. OS/2 Toolkit ΓòÉΓòÉΓòÉ
  2143.  
  2144.  
  2145. You may distribute components from the OS/2 Toolkit included in the package 
  2146. which are header files and include files and you may modify and distribute 
  2147. components from the OS/2 Toolkit included in the package which are sample 
  2148. programs provided that such header files, include files and sample programs are 
  2149. distributed only for the purposes of developing, using, marketing and 
  2150. distributing application programs written to the OS/2 application programming 
  2151. interface.  Further, with respect to sample programs, each copy of any portion 
  2152. thereof or any derivative work which is so distributed must include a copyright 
  2153. notice as follows: 
  2154.  
  2155.  
  2156.    (c) Copyright (your company name) (year). All Rights Reserved. 
  2157.  
  2158.  
  2159. ΓòÉΓòÉΓòÉ 8.3. IBM SOMobjects ΓòÉΓòÉΓòÉ
  2160.  
  2161.  
  2162. You may sublicense the IBM SOMobjects Kernel and Workstation DSOM, Version 2.0 
  2163. for OS/2 and for Windows but only if incorporated as part of your application 
  2164. and only if:  your application adds significant function to the function of the 
  2165. IBM SOM and DSOM components; you retain in any copies made of the IBM SOM and 
  2166. DSOM components all IBM copyright and proprietary rights notices contained 
  2167. therein.  Further, you include a copyright notice in the following format on 
  2168. the media label attached to any copies of your application which includes the 
  2169. IBM SOM and DSOM components: 
  2170.  
  2171.  
  2172.    (c) Copyright (your company name) and others (date).  All Rights Reserved. 
  2173.  
  2174. you indemnify Powersoft and International Business Machines Corporation, 
  2175. including their subsidiaries, from and against any claim arising from the 
  2176. distribution of your application or otherwise arising hereunder excluding any 
  2177. claims that the IBM SOM and DSOM components infringe a U.S.  copyright held by 
  2178. a third party; your application and the IBM SOM and DSOM components are 
  2179. sublicensed pursuant to a written license agreement between you and your 
  2180. customer which conforms substantially to the terms and conditions of the 
  2181. Powersoft Language Products Software License Agreement (printed elsewhere in 
  2182. this document) together with the additional terms and conditions set forth 
  2183. herein.  Without limiting the generality of the foregoing, said license 
  2184. agreement shall indicate that you are the licensor and shall contain provisions 
  2185. limiting Powersoft's and IBM liability to the same extent as they are limited 
  2186. in the Powersoft Language Products Software License Agreement and these 
  2187. additional terms and conditions. 
  2188.  
  2189. You may sublicense to your customers the rights to reproduce and distribute the 
  2190. IBM SOM and DSOM components provided such sublicense is in writing and imposes 
  2191. terms and conditions upon your customers which are no less restrictive as are 
  2192. imposed upon you as set forth in the Powersoft Language Products Software 
  2193. License Agreement (printed elsewhere in this document) together with the 
  2194. additional terms and conditions set forth herein. 
  2195.  
  2196.  
  2197. ΓòÉΓòÉΓòÉ 8.4. Microsoft MFC, Win32s ΓòÉΓòÉΓòÉ
  2198.  
  2199.  
  2200. You may sublicense the Microsoft Foundation Class Libraries and Win32s 
  2201. (collectively called the "MS CODE") but only in object-code form and solely in 
  2202. conjunction with your application developed using Watcom C/C++ and only if: 
  2203. your application and/or any documentation bears copyright notices sufficient to 
  2204. protect Microsoft's copyright in the MS CODE; the MS CODE is not incorporated 
  2205. into any product which would enable such MS CODE to be used in conjunction 
  2206. with, or to develop application programs for non-Microsoft operating systems 
  2207. (This restriction does not apply to MS CODE which runs or can be run on 
  2208. non-Microsoft operating systems without modification), you indemnify Powersoft 
  2209. and Microsoft from and against any claim arising from the distribution of your 
  2210. application or otherwise arising hereunder excluding any claims that the MS 
  2211. CODE infringes a U.S.  copyright held by a third party; your application and 
  2212. the MS CODE are sublicensed pursuant to a written license agreement between you 
  2213. and your customer which conforms substantially to the terms and conditions of 
  2214. the Powersoft Language Products Software License Agreement (printed elsewhere 
  2215. in this document) together with the additional terms and conditions set forth 
  2216. herein.  Without limiting the generality of the foregoing, said license 
  2217. agreement shall indicate that you are the licensor and shall contain provisions 
  2218. limiting Powersoft's and Microsoft's liability to the same extent as they are 
  2219. limited in the Powersoft Language Products Software License Agreement and these 
  2220. additional terms and conditions.  You may also modify the MFC components of the 
  2221. MS CODE and reproduce and distribute such modifications in object-code form as 
  2222. part of your application. 
  2223.  
  2224.  
  2225. ΓòÉΓòÉΓòÉ 9. Release Notes for Watcom C/C++ 11.0 ΓòÉΓòÉΓòÉ
  2226.  
  2227.  
  2228. There are a number of enhancements and changes in this new version of Watcom 
  2229. C/C++.  The following sections outline most of the major changes.  You should 
  2230. consult the User's Guide for full details on these and other changes made to 
  2231. the compiler and related tools.  You should check the next section to determine 
  2232. if you need to recompile your application. 
  2233.  
  2234.  
  2235. ΓòÉΓòÉΓòÉ 9.1. Changes in 11.0 that may Require Recompilation ΓòÉΓòÉΓòÉ
  2236.  
  2237.  
  2238. Do not attempt to mix object code generated by earlier versions of the 
  2239. compilers with object code generated by this release or with the libraries 
  2240. provided in this release. 
  2241.  
  2242. A new C++ object model has been implemented.  If you have undefined references 
  2243. to __wcpp_3_* names, you have old object code.  If you have undefined 
  2244. references to __wcpp_4_*, you have old libraries and new object code. 
  2245.  
  2246.  clock() 
  2247.       The clock function accuracy has changed from 100 ticks per second to 1000 
  2248.       ticks per second (i.e., CLOCKS_PER_SEC has changed).  Source code that 
  2249.       uses the clock function and CLOCKS_PER_SEC in its calculations must be 
  2250.       recompiled before linking the application with new libraries. 
  2251.  
  2252.  
  2253. ΓòÉΓòÉΓòÉ 9.2. Major Differences from Version 10.6 ΓòÉΓòÉΓòÉ
  2254.  
  2255.  
  2256. The following sections summarize the major differences from the previous 
  2257. release of Watcom C/C++. 
  2258.  
  2259.      In general, we have improved Microsoft compatibility in our compilers 
  2260.       (more warnings instead of errors, support for MS extensions, etc.) and 
  2261.       tools. 
  2262.      Some of the Win32 and 32-bit OS/2 versions of our tools are now available 
  2263.       in DLL form. 
  2264.  
  2265.  
  2266.          EXE    DLL     Description 
  2267.          ------  -------   ----------------------- 
  2268.          wcc    wccd    16-bit x86 C compiler 
  2269.          wcc386  wccd386   32-bit x86 C compiler 
  2270.          wpp    wppdi86   16-bit x86 C++ compiler 
  2271.          wpp386  wppd386   32-bit x86 C++ compiler 
  2272.          wlink   wlink    Watcom Linker 
  2273.          wlib   wlibd    Watcom Library Manager 
  2274.  
  2275.       This provides better performance when using the Integrated Development 
  2276.       Environment or Watcom Make.  See the description of the !loaddll 
  2277.       preprocessing directive in Watcom Make for more information. 
  2278.  
  2279.  
  2280. ΓòÉΓòÉΓòÉ 9.2.1. Changes to the C++ Compiler for 11.0 ΓòÉΓòÉΓòÉ
  2281.  
  2282.      The C++ compiler now optimizes empty base-classes to occupy zero storage 
  2283.       in the derived class memory layout.  The C++ Working Paper recently 
  2284.       allowed this optimization to be performed by conforming implementations. 
  2285.       Furthermore, the optimization has speed and size benefits.  There are 
  2286.       certain classes of (broken) C++ programs that may not function properly 
  2287.       with the new optimization.  If you explicitly memset() an empty base 
  2288.       class, you will be clearing memory that you may not expect to be cleared 
  2289.       since the "zero sized" base class in actual fact shares storage with the 
  2290.       first member of the derived class.  A memset() of the entire derived 
  2291.       class is fine though. 
  2292.      We have added support for the mutable keyword which is used to indicate 
  2293.       data members that can be modified even if you have a const pointer to the 
  2294.       class. 
  2295.  
  2296.       Example: 
  2297.  
  2298.          class S { 
  2299.            mutable int x; 
  2300.            void foo() const; 
  2301.          }; 
  2302.  
  2303.          void S::foo() const { 
  2304.            x = 1;  // OK since it is mutable 
  2305.          } 
  2306.      We have added support for the bool type along with true and false. 
  2307.      We have added support for the explicit attribute.  It marks a constructor 
  2308.       so that it will not be considered for overloading during implicit 
  2309.       conversions. 
  2310.  
  2311.       Example: 
  2312.  
  2313.          struct S { 
  2314.            explicit S( int ); 
  2315.          }; 
  2316.  
  2317.          S v = 1;   // error; cannot convert 'int' to 'S' 
  2318.  
  2319.       Suppose the class was changed as follows: 
  2320.  
  2321.       Example: 
  2322.  
  2323.          struct S { 
  2324.           explicit S(int ); 
  2325.           S( char ); 
  2326.          }; 
  2327.  
  2328.          S v = 1;  // OK; S( char ) is called 
  2329.  
  2330.       The fact that S(int) is not considered leaves S(char) as the only way to 
  2331.       satisfy the implicit conversion. 
  2332.      We have added support for namespaces. 
  2333.  
  2334.  
  2335.          namespace x { 
  2336.            // anything that can go in file-scope 
  2337.          } 
  2338.          namespace { 
  2339.            // anything in here is local to your module! 
  2340.          } 
  2341.  
  2342.       In the above example, you can access names in the namespace "x" by "x::" 
  2343.       scoping.  Alternatively, you can use the "using namespace x" statement 
  2344.       (thereby eliminating the need for "x::" scoping).  You can include a part 
  2345.       of the namespace into the current scope with the "using x::member" 
  2346.       statement.  (also eliminating the need for "x::" scoping). 
  2347.         1. Namespaces eliminate the hand mangling of names.  For example, 
  2348.            instead of prefixing names with a distinguishing string like "XPQ_" 
  2349.            (e.g., XPQ_Lookup), you can put the names in a namespace called 
  2350.            "XPQ". 
  2351.  
  2352.         2. Namespaces allow for private names in a module.  This is most useful 
  2353.            for types which are used in a single module. 
  2354.  
  2355.         3. Namespaces encourage the meaningful classification of implementation 
  2356.            components.  For example, code-generation components might reside in 
  2357.            a namespace called "CodeGen". 
  2358.      We have added support for RTTI (Run-Time Type Information). 
  2359.      We have added support for the new C++ cast notation.  It allows you to 
  2360.       use less powerful casts that the all powerful C-style cast and to write 
  2361.       more meaningful code.  The idea is to eliminate explicit casts by using a 
  2362.       more meaningful new-style cast.  The new C++ casts are: 
  2363.  
  2364.       reinterpret_cast < type-id >(expr) 
  2365.  
  2366.       const_cast < type-id >( expr ) 
  2367.       static_cast < type-id >( expr ) 
  2368.       dynamic_cast < type-id >( expr ) (part of RTTI) 
  2369.      We have improved (faster) pre-compiled header support. 
  2370.      We have added "long long" (64-bit floating-point) support in the form of 
  2371.       a new __int64 type. 
  2372.      The default structure packing was changed from "zp1" to "zp2" in the 
  2373.       16-bit compiler and from "zp1" to "zp8" in the 32-bit compiler. 
  2374.      The default type of debugging information that is included in object 
  2375.       files is "Dwarf".  It used to be "Watcom". 
  2376.      A new double-byte string processing option has been added (zkl).  When 
  2377.       this option is specified, the local or current code page character set is 
  2378.       used to decide if the compiler should process strings as if they might 
  2379.       contain double-byte characters. 
  2380.  
  2381.  
  2382. ΓòÉΓòÉΓòÉ 9.2.2. Changes to the C Compiler for 11.0 ΓòÉΓòÉΓòÉ
  2383.  
  2384.      We have improved (faster) pre-compiled header support. 
  2385.      We have added "long long" (64-bit floating-point) support in the form of 
  2386.       a new __int64 type. 
  2387.      The default structure packing was changed from "zp1" to "zp2" in the 
  2388.       16-bit compiler and from "zp1" to "zp8" in the 32-bit compiler. 
  2389.      The default type of debugging information that is included in object 
  2390.       files is "Dwarf".  It used to be "Watcom". 
  2391.      A new double-byte string processing option has been added (zkl).  When 
  2392.       this option is specified, the local or current code page character set is 
  2393.       used to decide if the compiler should process strings as if they might 
  2394.       contain double-byte characters. 
  2395.  
  2396.  
  2397. ΓòÉΓòÉΓòÉ 9.2.3. Changes to the Code Generator for 11.0 ΓòÉΓòÉΓòÉ
  2398.  
  2399.      We support Microsoft-compatible in-line assembly formats using the "_asm" 
  2400.       keyword. 
  2401.      A new optimization, "branch prediction", has been added.  This 
  2402.       optimization is enabled by the "ob" or "ox" compiler options.  The code 
  2403.       generator tries to increase the density of cache use by predicting 
  2404.       branches based upon heuristics (this optimization is especially important 
  2405.       for Intel's Pentium Pro). 
  2406.      We have added Multi-media Extensions (MMX) support to the in-line 
  2407.       assemblers. 
  2408.      We have added "long long" (64-bit floating-point) support in the form of 
  2409.       a new __int64 type. 
  2410.  
  2411.  
  2412. ΓòÉΓòÉΓòÉ 9.2.4. Changes to the Compiler Tools for 11.0 ΓòÉΓòÉΓòÉ
  2413.  
  2414.      The Watcom Linker supports incremental linking. 
  2415.      The Watcom Linker can now process COFF and ELF format object files, as 
  2416.       well as OMF et al.  The Watcom Linker can now read both AR-format 
  2417.       (Microsoft compatible) libraries and old-style OMF libraries. 
  2418.      Support for creating 16-bit DOS overlaid executables has been removed 
  2419.       from the linker. 
  2420.      The Watcom Library Manager (WLIB) can now process COFF and ELF format 
  2421.       object files, as well as OMF et al.  The Watcom Library Manager can now 
  2422.       read/write both AR-format (Microsoft compatible) libraries and old-style 
  2423.       OMF libraries.  The default output format is AR-format and this can be 
  2424.       changed by switches.  The Watcom Library Manager can output various 
  2425.       format import libraries. 
  2426.      We have added Multi-media Extensions (MMX) support to the Watcom 
  2427.       Assembler (WASM). 
  2428.      A new version of the Watcom Disassembler (WDIS) is included.  It can 
  2429.       process ELF, COFF or OMF object files and ELF, COFF or PE format (Win32) 
  2430.       executables. 
  2431.  
  2432.       The old disassembler (WDISASM) has been retired and is not included in 
  2433.       the package. 
  2434.      We have added new tool front-ends that emulate Microsoft tools.  These 
  2435.       are: 
  2436.         -  nmake 
  2437.         -  cl 
  2438.         -  link 
  2439.         -  lib 
  2440.         -  rc 
  2441.         -  cvtres 
  2442.       These programs take the usual Microsoft arguments and translate them, 
  2443.       where possible, into equivalent Watcom arguments and spawn the equivalent 
  2444.       Watcom tools. 
  2445.      Watcom Make now processes Microsoft format makefiles when the "ms" option 
  2446.       is used. 
  2447.  
  2448.  
  2449. ΓòÉΓòÉΓòÉ 9.2.5. Changes to the C/C++ Libraries for 11.0 ΓòÉΓòÉΓòÉ
  2450.  
  2451.      We have added multi-byte and wide character (including UNICODE) support 
  2452.       to the libraries. 
  2453.      We include run-time DLLs for the C, Math and C++ Libraries. 
  2454.      We have added Multi-media Extensions (MMX) support to the libraries. 
  2455.      The following new functions were added to the library... 
  2456.       multi-byte functions 
  2457.  
  2458.      The clock function accuracy has changed from 100 ticks per second to 1000 
  2459.       ticks per second (i.e., CLOCKS_PER_SEC has changed). 
  2460.      A "commit" flag ("c") was added to the fopen() mode argument. 
  2461.      The global translation mode flag default is "text" unless you explicitly 
  2462.       link your program with BINMODE.OBJ. 
  2463.      Processing of the "0" flag in the format string for the printf() family 
  2464.       of functions has been corrected such that when a precision is specified, 
  2465.       the "0" flag is ignored. 
  2466.  
  2467.       Example: 
  2468.  
  2469.          printf( "%09.3lf\n", 1.34242 ); // "0" flag is ignored 
  2470.          printf( "%09lf\n", 1.34242 ); // "0" flag is not ignored 
  2471.      Support for printing __int64 values was added to printf and related 
  2472.       functions. 
  2473.      Support for scanning __int64 values was added to scanf and related 
  2474.       functions. 
  2475.      The Win32 _osver variable was added to the library. 
  2476.      The Win32 _winmajor,  _winminor and _winver variables were added to the 
  2477.       library. 
  2478.  
  2479.  
  2480. ΓòÉΓòÉΓòÉ 9.2.6. Changes to the DOS Graphics Library for 11.0 ΓòÉΓòÉΓòÉ
  2481.  
  2482.      The graphics library now performs the VESA test before testing for vendor 
  2483.       specific graphics cards.  This fix is intended to broaden the number of 
  2484.       graphics cards that are supported. 
  2485.  
  2486.  
  2487. ΓòÉΓòÉΓòÉ 9.2.7. Changes in Microsoft Foundation Classes Support for 11.0 ΓòÉΓòÉΓòÉ
  2488.  
  2489.      Version 4.1 of the 32-bit MFC is included in the package. 
  2490.      Version 2.52b of the 16-bit MFC is included in the package. 
  2491.  
  2492.  
  2493. ΓòÉΓòÉΓòÉ 9.2.8. Changes in Microsoft Win32 SDK Support for 11.0 ΓòÉΓòÉΓòÉ
  2494.  
  2495.      The Win32 SDK is supported for Windows 95 and Windows NT platforms. 
  2496.  
  2497.  
  2498. ΓòÉΓòÉΓòÉ 9.2.9. Changes in Blue Sky's Visual Programmer for 11.0 ΓòÉΓòÉΓòÉ
  2499.  
  2500.      A new 32-bit version of Visual Programmer is included in the package. 
  2501.       This version runs on 32-bit Windows 95 and NT.  The 16-bit version of 
  2502.       Visual Programmer is no longer included in the package. 
  2503.      You can generate 16-bit applications with it, but you must be careful to 
  2504.       avoid using Win95 controls. 
  2505.      This new version fixes all known bugs in the previous version. 
  2506.  
  2507.  
  2508. ΓòÉΓòÉΓòÉ 9.3. Changes in 10.6 that may Require Recompilation ΓòÉΓòÉΓòÉ
  2509.  
  2510.  _diskfree_t 
  2511.       The struct members of the _diskfree_t structure has been changed from 
  2512.       UNSIGNED SHORTs to UNSIGNED INTs.  This is to deal with possible HPFS 
  2513.       partitions whose size will overflow a short, as well as Microsoft 
  2514.       compatibility. 
  2515.  
  2516.  clock() 
  2517.       The clock function accuracy has changed from 100 ticks per second to 1000 
  2518.       ticks per second (i.e., CLOCKS_PER_SEC has changed).  Source code that 
  2519.       uses the clock function and CLOCKS_PER_SEC in its calculations must be 
  2520.       recompiled before linking the application with new libraries. 
  2521.  
  2522.  
  2523. ΓòÉΓòÉΓòÉ 9.4. Major Differences from Version 10.5 ΓòÉΓòÉΓòÉ
  2524.  
  2525.  
  2526. The following sections summarize the major differences from the previous 
  2527. release of Watcom C/C++. 
  2528.  
  2529.  
  2530. ΓòÉΓòÉΓòÉ 9.4.1. Windows 95 Help File Format ΓòÉΓòÉΓòÉ
  2531.  
  2532.  
  2533. We have included Windows 95 format help files. 
  2534.  
  2535.  
  2536. ΓòÉΓòÉΓòÉ 9.4.2. Changes to the C++ Compiler in 10.6 ΓòÉΓòÉΓòÉ
  2537.  
  2538.  
  2539. We have improved Microsoft compatibility so that Win32 SDK and MFC header files 
  2540. can be compiled without change. The following changes were required to support 
  2541. Win32 SDK header files. 
  2542.  
  2543.      We recognize the single underscore versions of __stdcall, __inline, and 
  2544.       __fastcall keywords. 
  2545.      The _fastcall and __fastcall keywords are scanned but ignored since they 
  2546.       refer to a particular Microsoft code generation technique.  Watcom's 
  2547.       generated code is always "fast". 
  2548.  
  2549.  The following changes were required to support MFC source code. 
  2550.  
  2551.      When /bt=DOS is specified, define _DOS. 
  2552.      When /bt=WINDOWS is specified, define _WINDOWS. 
  2553.      When /m[s|m|c|l|h] is specified, define __SW_M[S|M|C|L|H] and 
  2554.       _M_I86[S|M|C|L|H]M. 
  2555.  
  2556.  The compiler now supports the C++ Standard Template Library (STL).  This 
  2557.  library is available at the ftp site "butler.hpl.hp.com".  When compiling 
  2558.  applications that use the STL, you must use the "hd" compiler option for 
  2559.  debugging info (the "hw" option causes too much debug information to be 
  2560.  generated). 
  2561.  
  2562.  
  2563. ΓòÉΓòÉΓòÉ 9.4.3. Changes to the C Compiler in 10.6 ΓòÉΓòÉΓòÉ
  2564.  
  2565.  
  2566. We have improved Microsoft compatibility so that Win32 SDK and MFC header files 
  2567. can be compiled without change. The following changes were required to support 
  2568. Win32 SDK header files. 
  2569.  
  2570.      Support for the single underscore version of the __stdcall keyword. 
  2571.      When /bt=DOS is specified, define _DOS. 
  2572.      When /bt=WINDOWS is specified, define _WINDOWS. 
  2573.  
  2574.  The following changes were required to support SDK sample code. 
  2575.  
  2576.      You can specify calling convention information in a function prototype 
  2577.       and you do not have to specify the same information in the definition. 
  2578.       (Note:  This is required by the OS/2 Warp SDK samples.) 
  2579.      Structured exception handling is supported ( __try, __except and 
  2580.       __finally keywords). 
  2581.      Allow initialization of automatic array/struct data using variables and 
  2582.       function calls. 
  2583.  
  2584.  
  2585. ΓòÉΓòÉΓòÉ 9.4.4. Changes to the C Library in 10.6 ΓòÉΓòÉΓòÉ
  2586.  
  2587.  
  2588. The following new functions were added to the library. 
  2589.  
  2590.  _getw 
  2591.       read int from stream file 
  2592.  
  2593.  _putw 
  2594.       write int to stream file 
  2595.  
  2596.  The clock function accuracy has changed from 100 ticks per second to 1000 
  2597.  ticks per second (i.e., CLOCKS_PER_SEC has changed). 
  2598.  
  2599.  
  2600. ΓòÉΓòÉΓòÉ 9.4.5. Changes in Microsoft Foundation Classes Support for 10.6 ΓòÉΓòÉΓòÉ
  2601.  
  2602.      Version 3.2 of the 32-bit MFC is included in the package. 
  2603.      Version 2.52b of the 16-bit MFC is included in the package. 
  2604.  
  2605.  
  2606. ΓòÉΓòÉΓòÉ 9.4.6. Changes to the Image Editor in 10.6 ΓòÉΓòÉΓòÉ
  2607.  
  2608.      Support has been added for 256 colour bitmaps. 
  2609.      Support has been added for 16 X 16 icons. 
  2610.      Support has been added for 48 X 48 icons. 
  2611.  
  2612.  
  2613. ΓòÉΓòÉΓòÉ 9.4.7. Changes to the Dialog Editor in 10.6 ΓòÉΓòÉΓòÉ
  2614.  
  2615.      Support has been added for Windows 95 controls. 
  2616.      Support has been added for adding new control styles to existing 
  2617.       controls. 
  2618.      Support has been added for new dialog styles. 
  2619.      Support has been added for allowing help IDs to be specified in dialog 
  2620.       and control statements. 
  2621.      Support has been added for generating new resource statements in .RC 
  2622.       files. 
  2623.  
  2624.  
  2625. ΓòÉΓòÉΓòÉ 9.4.8. Changes to the Resource Editor in 10.6 ΓòÉΓòÉΓòÉ
  2626.  
  2627.      Support has been added for new Windows 95 DIALOGEX resource type. 
  2628.      Support has been added for generating new DIALOGEX resource statements in 
  2629.       .RC files. 
  2630.  
  2631.  
  2632. ΓòÉΓòÉΓòÉ 9.4.9. Changes to the Resource Compiler in 10.6 ΓòÉΓòÉΓòÉ
  2633.  
  2634.      Support has been added for extended styles for dialogs. 
  2635.      Support has been added for the RCINCLUDE keyword. 
  2636.  
  2637.  
  2638. ΓòÉΓòÉΓòÉ 9.5. Major Differences from Version 10.0 ΓòÉΓòÉΓòÉ
  2639.  
  2640.      New installation program 
  2641.      Visual Programmer for Windows (MFC) applications 
  2642.      MFC 3.0 support 
  2643.      Native C++ exception handling support 
  2644.      Improved language compatibility with Microsoft 
  2645.      Browser can now be used to browse C code 
  2646.      OS/2 3.0 Warp support 
  2647.      Toolkit for OS/2 1.3 
  2648.      Windows NT 3.5 support 
  2649.      Toolkit for Windows NT 3.5 
  2650.      Windows 95 (Chicago) support 
  2651.      Source Revision Control System hooks in editor 
  2652.      TCP/IP remote debug servers for OS/2 and Windows NT/95 
  2653.  
  2654.  In addition to these new features, we have also made a number of improvements 
  2655.  to the software. 
  2656.  
  2657.    1. The editor is more tightly integrated with the IDE. 
  2658.  
  2659.    2. It is now easier to select your own favourite editor from the IDE. 
  2660.  
  2661.    3. The keyboard interface in the Integrated Development Environment (IDE) 
  2662.       has been improved. 
  2663.  
  2664.    4. The "fr" option, which is supported by the compilers & assembler, can be 
  2665.       used to name the error file drive, path, file name and/or extension. 
  2666.  
  2667.    5. We have added the "t<number>" option to the C++ compiler to set the 
  2668.       number of spaces in a tab stop (for column numbers in error messages). 
  2669.  
  2670.    6. The C compiler now supports @filename on the command line like the C++ 
  2671.       compiler currently does. 
  2672.  
  2673.    7. The "__stdcall" linkage convention has changed.  All C symbols (extern 
  2674.       "C" symbols in C++) are now suffixed by "@nnn" where "nnn" is the sum of 
  2675.       the argument sizes (each size is rounded up to a multiple of 4 bytes so 
  2676.       that char and short are size 4).  When the argument list contains "...", 
  2677.       the "@nnn" suffix is omitted.  This was done for compatibility with 
  2678.       Microsoft.  Use the "zz" option for backwards compatibility. 
  2679.  
  2680.    8. The 32-bit "__cdecl" linkage convention has changed.  Watcom C/C++ 10.0 
  2681.       __cdecl did not match the Microsoft Visual C++ __cdecl in terms of the 
  2682.       binary calling convention; Visual C++ saves EBX in a __cdecl function but 
  2683.       Watcom C/C++ 10.0 modified EBX.  Watcom C/C++ has been changed to match 
  2684.       Visual C/C++. 
  2685.  
  2686.       If you wrote a "__cdecl" function in an earlier version of Watcom C/C++, 
  2687.       the EBX register was not saved/restored.  Starting with release 10.5, the 
  2688.       EBX register will be saved/restored in the prologue/epilogue of a 
  2689.       "__cdecl" function. 
  2690.  
  2691.       Another implication of this change is that "__cdecl" functions compiled 
  2692.       with an earlier version of Watcom C/C++ don't match the calling 
  2693.       conventions of the current version.  The solution is either to recompile 
  2694.       the functions or to define a "__cdecl_old" pragma that matches the old 
  2695.       calling conventions. 
  2696.  
  2697.  
  2698.          #pragma aux __cdecl_old "_*" \ 
  2699.                parm caller [] \ 
  2700.                value struct float struct routine [eax] \ 
  2701.                modify [eax ebx ecx edx]; 
  2702.  
  2703.          #pragma aux (__cdecl_old) foo; 
  2704.  
  2705.          extern int foo( int a, int b ); 
  2706.  
  2707.          void main() 
  2708.          { 
  2709.            printf( " %d\n", foo( 1, 2 ) ); 
  2710.          } 
  2711.  
  2712.    9. We now allow: 
  2713.  
  2714.  
  2715.          extern "C" int __cdecl x; 
  2716.  
  2717.       It must be extern "C" for __cdecl to take effect since variables have 
  2718.       their type mangled into the name for "C++" linkage. 
  2719.  
  2720.   10. In C++, we have removed the warning for "always true/false" expressions 
  2721.       if the sub-expressions are constant values. 
  2722.  
  2723.   11. We have added support for: 
  2724.  
  2725.  
  2726.          #pragma pack(push,4); 
  2727.          #pragma pack(push); 
  2728.          #pragma pack(pop) 
  2729.  
  2730.   12. We have added support for: 
  2731.  
  2732.  
  2733.          #pragma comment(lib,"mylib.lib") 
  2734.  
  2735.       which has the same semantics as: 
  2736.  
  2737.  
  2738.          #pragma library( "mylib.lib" ) 
  2739.  
  2740.   13. We have added support for expanding macros in the code_seg/data_seg 
  2741.       pragmas: 
  2742.  
  2743.  
  2744.          #define DATA_SEG_NAME "MYDATA" 
  2745.          #define CODE_SEG_NAME "MYCODE" 
  2746.  
  2747.          #pragma data_seg( DATA_SEG_NAME ) 
  2748.          int x = 3; 
  2749.  
  2750.          #pragma code_seg( CODE_SEG_NAME ) 
  2751.          int fn() { 
  2752.            return x; 
  2753.          } 
  2754.  
  2755.   14. We have fixed the 16-bit compiler so that it matches the Microsoft 16-bit 
  2756.       C compiler for the following cases: 
  2757.  
  2758.           If a pascal function is defined when compiling for Windows 3.x, use 
  2759.            the fat Windows 3.x prologue in the function. 
  2760.           If a cdecl function is defined when compiling for Windows 3.x, use 
  2761.            the fat Windows 3.x prologue in the function. 
  2762.  
  2763.   15. We have fixed the compiler so that 
  2764.  
  2765.  
  2766.          #include </dir/file.h> 
  2767.  
  2768.       works as expected (it was searching along the INCLUDE path only). 
  2769.  
  2770.   16. In C++, we have fixed a problem where an import was generated in the 
  2771.       object file for a virtual function call.  This will reduce the size of 
  2772.       executables under certain circumstances. 
  2773.  
  2774.   17. In C++, we have removed the prohibition of pointer to array of unknown 
  2775.       size declarations. 
  2776.  
  2777.       Example: 
  2778.  
  2779.          int (*p)[]; 
  2780.  
  2781.   18. In C++, we have fixed the diagnosis of lexical problems during macro 
  2782.       expansion to remove spurious warnings. 
  2783.  
  2784.       Example: 
  2785.  
  2786.          #define stringize( x )  #x 
  2787.  
  2788.          stringize( 2131231236172637126371273612763612731 ) 
  2789.  
  2790.   19. We have corrected the check for too many bytes in #pragma for assembler 
  2791.       style aux #pragmas. 
  2792.  
  2793.   20. Undeclared class names in elaborated class specifiers are now declared in 
  2794.       the nearest enclosing non-class scope.  Undeclared classes are also 
  2795.       allowed in arguments now. 
  2796.  
  2797.       Example: 
  2798.  
  2799.          struct S { 
  2800.            // used to declared ::S::N but now declares ::N 
  2801.            struct N *p; 
  2802.          }; 
  2803.  
  2804.          void foo( struct Z *p );   // declares ::Z 
  2805.  
  2806.   21. We have fixed unduly harsh restriction on virtual ...-style functions. 
  2807.       They are now allowed in single inheritance hierarchies as long as the 
  2808.       return type is not changed when the virtual function is overridden.  In 
  2809.       multiple inheritance hierarchies, an implementation restriction is still 
  2810.       present for generating a 'this' adjustment thunk for virtual functions. 
  2811.  
  2812.   22. We have fixed line number information for multi-line statement 
  2813.       expressions in some weird cases. 
  2814.  
  2815.   23. We have fixed function template parsing of user-defined conversions that 
  2816.       use an uninstantiated class in their operator name. 
  2817.  
  2818.       Example: 
  2819.  
  2820.          void ack( int ); 
  2821.  
  2822.          template <class T> 
  2823.            struct S { 
  2824.              S( T x ) 
  2825.              { 
  2826.                ack( x ); 
  2827.              } 
  2828.            }; 
  2829.  
  2830.  
  2831.          template <class T> 
  2832.            struct W { 
  2833.              operator S<T>(); 
  2834.            }; 
  2835.  
  2836.  
  2837.          template <class T> 
  2838.            W<T>::operator S<T>() { 
  2839.              return 0; 
  2840.            } 
  2841.  
  2842.   24. We have fixed a compiler problem that caused a linker warning "lazy 
  2843.       reference for <virtual-fn> has different default resolutions" in cases 
  2844.       where the compiler or programmer optimized virtual function calls to 
  2845.       direct calls in modules that also contained virtual calls. 
  2846.  
  2847.       Example: 
  2848.  
  2849.          T.H 
  2850.            struct S { 
  2851.              virtual int foo() { return __LINE__; } 
  2852.            }; 
  2853.            struct T : S { 
  2854.              virtual int foo() { return __LINE__; } 
  2855.            }; 
  2856.  
  2857.          T1.CPP 
  2858.            #include "t.h" 
  2859.            struct Q : T { 
  2860.              virtual int foo() { return S::foo() + __LINE__; } 
  2861.            }; 
  2862.  
  2863.            void foo( T *p ) 
  2864.            { 
  2865.              Q y; 
  2866.              y.foo(); 
  2867.              p->foo(); 
  2868.            } 
  2869.  
  2870.  
  2871.          T2.CPP 
  2872.            #include "t.h" 
  2873.  
  2874.            void foo( T *p ); 
  2875.  
  2876.            void ack( T *p ) { 
  2877.              p->foo(); 
  2878.              foo(p); 
  2879.            } 
  2880.  
  2881.  
  2882.            main() { 
  2883.              T q; 
  2884.              ack( &q ); 
  2885.            } 
  2886.  
  2887.   25. When a class value is returned and is immediately (in the same 
  2888.       expression) used to call a member function, the value may not be stored 
  2889.       in memory. 
  2890.  
  2891.       Work around:  introduce a temporary 
  2892.  
  2893.       Example: 
  2894.  
  2895.          struct S { 
  2896.            int v; 
  2897.            int member(); 
  2898.          }; 
  2899.  
  2900.          S foo(); 
  2901.  
  2902.  
  2903.          void example( void ) 
  2904.          { 
  2905.            // foo().member();  // replace this line with: 
  2906.            S temp = foo(); 
  2907.            temp.member(); 
  2908.          } 
  2909.  
  2910.   26. Throwing pointers to functions did not work when the size of a function 
  2911.       pointer is greater than the size of a data pointer. 
  2912.  
  2913.       Work around:  place the function pointer in a class and throw the class 
  2914.       object. 
  2915.  
  2916.   27. We have fixed default argument processing for const references to an 
  2917.       abstract class.  The following example would not compile properly: 
  2918.  
  2919.       Example: 
  2920.  
  2921.          struct A { 
  2922.            virtual int foo() = 0; 
  2923.          }; 
  2924.  
  2925.          A &foo(); 
  2926.  
  2927.  
  2928.          void ack( A const &r = foo() ); 
  2929.  
  2930.          void bar() { 
  2931.            ack(); 
  2932.          } 
  2933.  
  2934.   28. We have made "DllMain" default to extern "C" linkage for Microsoft Visual 
  2935.       C++ compatibility. 
  2936.  
  2937.   29. We have duplicated a Microsoft Visual C++ extension that was required to 
  2938.       parse the Windows 95 SDK header files. 
  2939.  
  2940.       Example: 
  2941.  
  2942.          typedef struct S { 
  2943.          } S, const *CSP; 
  2944.            ^^^^^- not allowed in ANSI C or current WP for C++ 
  2945.  
  2946.   30. We now do not warn about starting a nested comment if the comment is just 
  2947.       about to end. 
  2948.  
  2949.       We also fixed the code that figures out where a comment was started so 
  2950.       that a nested comment warning is more helpful. 
  2951.  
  2952.       Example: 
  2953.  
  2954.              /*/////////*/ 
  2955.                   ^- 
  2956.  
  2957.   31. We have fixed a problem where extra informational notes were not being 
  2958.       printed for the error message that exceeded the error message limit. 
  2959.  
  2960.       Example: 
  2961.  
  2962.          // compile -e2 
  2963.          struct S { 
  2964.            void foo(); 
  2965.          }; 
  2966.  
  2967.  
  2968.          void foo( S const *p ) 
  2969.          { 
  2970.            p->foo(); 
  2971.            p->foo(); 
  2972.            p->foo(); 
  2973.            p->foo(); 
  2974.          } 
  2975.  
  2976.   32. We have fixed a problem where the line number for an error message was 
  2977.       incorrect. 
  2978.  
  2979.       Example: 
  2980.  
  2981.          struct S { 
  2982.            void foo() const; 
  2983.            void bar(); 
  2984.          }; 
  2985.  
  2986.  
  2987.          void S::foo() const 
  2988.          { 
  2989.            bar(); 
  2990.  
  2991.            this->bar(); 
  2992.  
  2993.          } 
  2994.  
  2995.   33. We have fixed output of browser information for instantiated function 
  2996.       template typedefs. 
  2997.  
  2998.   34. We have upgraded the C++ parser so that casts and member pointer 
  2999.       dereferences can appear on the left hand side of the assignment 
  3000.       expression without parentheses. 
  3001.  
  3002.       Example: 
  3003.  
  3004.          p->*mp = 1; 
  3005.          (int&)x = 1; 
  3006.  
  3007.   35. In several cases, when a function return or a construction was 
  3008.       immediately dotted in an expression, the generated code was incorrect: 
  3009.  
  3010.       Example: 
  3011.  
  3012.          struct S { 
  3013.           int x; 
  3014.           int foo(); 
  3015.          }; 
  3016.  
  3017.  
  3018.          extern S gorf(); 
  3019.  
  3020.          void bar() 
  3021.          { 
  3022.            gorf().foo(); 
  3023.          } 
  3024.  
  3025.       The work around was to break the statement in two: 
  3026.  
  3027.       Example: 
  3028.  
  3029.          S temp = gorf(); 
  3030.          temp.foo(); 
  3031.  
  3032.   36. In several cases, when a function return or a construction was 
  3033.       immediately addressed in an expression, the generated code was incorrect: 
  3034.  
  3035.       Example: 
  3036.  
  3037.          struct S { 
  3038.           int x; 
  3039.          }; 
  3040.  
  3041.  
  3042.          extern void fun( S* ); 
  3043.  
  3044.          extern S gorf(); 
  3045.  
  3046.  
  3047.          void bar() 
  3048.          { 
  3049.            fun( &gorf() ); 
  3050.          } 
  3051.  
  3052.       The work around was to break the statement in two: 
  3053.  
  3054.       Example: 
  3055.  
  3056.          S temp = gorf(); 
  3057.          fun( &temp ); 
  3058.  
  3059.   37. We have added support for: 
  3060.  
  3061.  
  3062.          #pragma error "error message" 
  3063.  
  3064.       Use the ANSI method because it is more portable and acceptable (Microsoft 
  3065.       header files use the less portable #pragma when there is a perfectly 
  3066.       fine, portable way to issue a message). 
  3067.  
  3068.       The portable, acceptable method is: 
  3069.  
  3070.  
  3071.          #error "error message" 
  3072.  
  3073.   38. We have added support for __declspec(dllexport), __declspec(dllimport), 
  3074.       __declspec(thread), and __declspec(naked) for Win32 (i.e., WinNT 3.5 and 
  3075.       Win95) programs.  Here are some examples: 
  3076.       Example: 
  3077.  
  3078.          __declspec(dllexport) int a;     // export 'a' variable 
  3079.          __declspec(dllexport) int b()    // export 'b' function 
  3080.          { 
  3081.          } 
  3082.  
  3083.  
  3084.          struct __declspec(dllexport) S { 
  3085.            static int a;          // export 'a' static member 
  3086.            void b();            // export 'b' member fn 
  3087.          }; 
  3088.  
  3089.  
  3090.          extern __declspec(dllimport) int a; // import 'a' from a .DLL 
  3091.          extern __declspec(dllimport) int b();//import 'b' from a .DLL 
  3092.  
  3093.          struct __declspec(dllimport) I { 
  3094.            static int a;          // import 'a' static member 
  3095.            void b();            // import 'b' member fn 
  3096.          }; 
  3097.  
  3098.   39. The C++ compiler generates better error messages for in-class 
  3099.       initializations and pure virtual functions. 
  3100.  
  3101.       Example: 
  3102.  
  3103.          struct S { 
  3104.            static int const a = 0; 
  3105.            static int const b = 1; 
  3106.            void foo() = 0; 
  3107.            void bar() = 1; 
  3108.            virtual void ack() = 0; 
  3109.            virtual void sam() = 1; 
  3110.          }; 
  3111.  
  3112.   40. We have fixed macro processing code so that the following program 
  3113.       compiles correctly.  The compiler was not treating "catch" as a keyword 
  3114.       after the expansion of "catch_all". 
  3115.  
  3116.       Example: 
  3117.  
  3118.          #define catch(n) catch(n &exception) 
  3119.          #define xall (...) 
  3120.          #define catch_all catch xall 
  3121.  
  3122.  
  3123.          main() 
  3124.          { 
  3125.            try{ 
  3126.            } 
  3127.            catch_all{ 
  3128.            } 
  3129.          } 
  3130.  
  3131.   41. We have fixed a problem where #pragma code_seg caused a page fault in the 
  3132.       compiler when the code_seg was empty. 
  3133.  
  3134.   42. We have fixed a rare problem where a #include of a file that was 
  3135.       previously included caused the primary source file to finish up if the 
  3136.       CR/LF pair for the line that the #include was on, straddled the C++ 
  3137.       compiler's internal buffering boundary. 
  3138.  
  3139.   43. We have added support for #pragma message( "message text" ).  It outputs 
  3140.       a message to stdout when encountered.  It is used in Microsoft SDK header 
  3141.       files to warn about directly including header files and obsolete files. 
  3142.  
  3143.   44. We have fixed #pragma code_seg/data_seg to properly set the class name of 
  3144.       the new segment in the object file. 
  3145.  
  3146.   45. We have a fixed a problem with the -zm -d2 options that caused a compiler 
  3147.       fault in some circumstances. 
  3148.  
  3149.   46. We have fixed default library records in .OBJ file so that user libraries 
  3150.       are ahead of default compiler libraries in the linker search order. 
  3151.  
  3152.   47. We have fixed handling of intrinsic math functions so that the code 
  3153.       generator will treat functions like sqrt as an operator. 
  3154.  
  3155.   48. We have added support for using OS-specific exception handling mechanisms 
  3156.       for C++ exception handling during code generation.  Enable it with the 
  3157.       new -zo option. 
  3158.  
  3159.   49. __stdcall functions now have Microsoft Visual C/C++ compatible name 
  3160.       mangling. 
  3161.  
  3162.   50. We have added a number of new functions to the C Library.  These have 
  3163.       been added to improve Microsoft compatibility. 
  3164.  
  3165.  
  3166.          dllmain (nt only) 
  3167.          libmain (nt only) 
  3168.          _access 
  3169.          _dos_commit 
  3170.          _dup 
  3171.          _ecvt 
  3172.          _fcvt 
  3173.          _fstat 
  3174.          _fstrdup 
  3175.          _gcvt 
  3176.          _itoa 
  3177.          _itoa 
  3178.          _locking 
  3179.          _lseek 
  3180.          _ltoa 
  3181.          _ltoa 
  3182.          _memicmp 
  3183.          _set_new_handler 
  3184.          _stat 
  3185.          _strdate 
  3186.          _strdup 
  3187.          _stricmp 
  3188.          _strlwr 
  3189.          _strnicmp 
  3190.          _strrev 
  3191.          _strtime 
  3192.          _strupr 
  3193.          _tolower 
  3194.          _toupper 
  3195.          __isascii 
  3196.          __iscsym 
  3197.          __iscsymf 
  3198.  
  3199.   51. In version 9.5, the linker used to include LIBFILE object files in 
  3200.       reverse order (i.e., the last one listed was the first to be included). 
  3201.       We have corrected this behaviour so that they are included in the order 
  3202.       listed. 
  3203.  
  3204.  
  3205.          Directive      Old Order  New Order 
  3206.          -------------    ---------  --------- 
  3207.          FILE   obj_a      3      3 
  3208.          LIBFILE obj_b      2      1 
  3209.          LIBFILE obj_c      1      2 
  3210.          FILE   obj_d      4      4 
  3211.  
  3212.       In the above example, the object files will be included in the order 
  3213.       indicated (LIBFILE object files are always included first). 
  3214.  
  3215.  
  3216. ΓòÉΓòÉΓòÉ 9.5.1. Changes in 10.5 that may Require Recompilation ΓòÉΓòÉΓòÉ
  3217.  
  3218.  __stdcall 
  3219.       If you use the __stdcall attribute within a program then you must 
  3220.       re-compile the function definition and all callers of the __stdcall 
  3221.       function. 
  3222.  
  3223.  __cdecl 
  3224.       The __cdecl attribute is not heavily used in Win32 programming so the 
  3225.       impact should be minimal but if you do use __cdecl within your own 
  3226.       programs, a re-compilation will be necessary. 
  3227.  
  3228.  
  3229. ΓòÉΓòÉΓòÉ 9.6. Major Differences from Version 10.0 LA ΓòÉΓòÉΓòÉ
  3230.  
  3231.  
  3232. If you have .tgt files created with the Limited Availability or Beta Integrated 
  3233. Development Environment, when you load them, the target window may say 
  3234. "Obsolete Form:  rename target type".  If it does: 
  3235.  
  3236.    1. Select the target window by clicking in it, 
  3237.  
  3238.    2. Choose "rename target" from the target menu (a rename target dialog will 
  3239.       appear), 
  3240.  
  3241.    3. Reselect the target type for this target (e.g., Win32 EXE), and 
  3242.  
  3243.    4. Select OK. 
  3244.  
  3245.  You should not continue to use .cfg files from the Limited Availability 
  3246.  version of the compiler.  Several new features have been added.  Using the old 
  3247.  files will cause problems. 
  3248.  
  3249.  The C++ compiler calling conventions have changed.  Any program that passes a 
  3250.  "data only" class or struct as a parameter, or returns a C++ object will need 
  3251.  to be recompiled.  We recommend that you recompile your application. 
  3252.  
  3253.  The C++ compiler now supports the use of the __export,  __cdecl,  __pascal, 
  3254.  __stdcall and __syscall keyword on class definitions.  These keywords will 
  3255.  affect all members of the defined class. 
  3256.  
  3257.  
  3258. ΓòÉΓòÉΓòÉ 9.7. Major Differences from WATCOM C9.5 /386 ΓòÉΓòÉΓòÉ
  3259.  
  3260.      The functionality of Watcom C/C++(16) and Watcom C/C++(32) is included in 
  3261.       a single package. 
  3262.      An Integrated Development Environment for Windows 3.x, Windows NT, 
  3263.       Windows 95 and OS/2 PM is included. 
  3264.      New, redesigned debugger with GUI interfaces for Windows 3.x, Windows NT, 
  3265.       Windows 95 and OS/2 PM is included. 
  3266.      The optimizer has been enhanced. 
  3267.      C++ Class Browser 
  3268.      New, redesigned user interface for the Profiler. 
  3269.      New support for C and C++ precompiled header files. 
  3270.      Windows resource editing tools are included: 
  3271.       Dialog Editor 
  3272.  
  3273.       Bitmap Editor 
  3274.  
  3275.       Resource Editor 
  3276.  
  3277.       Menu Editor 
  3278.  
  3279.       String Editor 
  3280.  
  3281.       Accelerator Editor 
  3282.  
  3283.      Windows development tools are included: 
  3284.       Dr.  WATCOM (a post mortem debug utility) 
  3285.  
  3286.       Spy (Windows message spy program) 
  3287.  
  3288.       DDESpy 
  3289.  
  3290.       Heap Walker 
  3291.  
  3292.       Zoom 
  3293.  
  3294.      On-line documentation is included. 
  3295.      Microsoft Foundation Classes for 32-bit Windows applications (MFC 4.1) 
  3296.       and 16-bit Windows 3.1 applications (MFC 2.52b) is included. 
  3297.      Creation of FlashTek DOS extender applications is supported. 
  3298.      Compiler executables have been created that run under all supported 
  3299.       operating systems.  They are located in the BINW directory. 
  3300.  
  3301.  
  3302. ΓòÉΓòÉΓòÉ 9.7.1. Items No Longer Supported ΓòÉΓòÉΓòÉ
  3303.  
  3304.      PenPoint development 
  3305.      Debugging of Ergo OS/386 DOS extender applications 
  3306.      DESQView remote debugging 
  3307.  
  3308.  
  3309. ΓòÉΓòÉΓòÉ 9.7.2. Changes in 10.0 that may Require Recompilation ΓòÉΓòÉΓòÉ
  3310.  
  3311.  
  3312. All C++ applications will require recompilation due to changes in the 
  3313. underlying object model.  C applications should not require recompilation, but 
  3314. you should recompile your application if you want to take full advantage new 
  3315. features in the debugger.  The changes to the C++ object model are: 
  3316.  
  3317.      Virtual table layout changed (NULL entry at offset 0 removed) 
  3318.      derived class packing adjusted to minimize padding bytes 
  3319.      exception handling code is improved (incompatible with 9.5) 
  3320.      name mangling for 'char' reduced from two chars to one char 
  3321.