home *** CD-ROM | disk | FTP | other *** search
/ IBM CD Showcase / OS2_CD_ROM.iso / smce0001 / cfirst11 / os2cpp / read.me < prev    next >
Encoding:
Text File  |  1993-10-12  |  18.8 KB  |  455 lines

  1. ===============================================================================
  2.      IBM* C Set ++ FirstStep* read.me file:
  3.  
  4.      (C) Copyright IBM Corp. 1993. All Rights Reserved.
  5.      US Government Users Restricted Rights - Use, duplication or disclosure
  6.      restricted by GSA ADP Schedule Contract with IBM Corp.
  7. ===============================================================================
  8.  
  9. This README file contains information pertaining to the C/C++ FirstStep*
  10. Tools components of C Set ++ FirstStep.  For the most recent information on
  11. the WorkFrame/2* product and OS/2* 2.1 Developer's Toolkit, please refer to
  12. their individual READ.ME files, found in the main installation directory for
  13. each product.
  14.  
  15. The following items are trademarks of the IBM Corporation.  They are denoted
  16. by an asterisk (*) when they first appear in the text.
  17.  
  18.     C Set ++
  19.     C Set ++ FirstStep
  20.     C Set/2
  21.     C/C++ FirstStep
  22.     IBM
  23.     OS/2
  24.     Presentation Manager
  25.     WorkFrame/2
  26.     WorkPlace Shell
  27.     XGA
  28.  
  29.  
  30. INSTALLATION
  31. ____________
  32.  
  33.  
  34. Follow the installation instructions in the Read Me First: Installing and
  35. Getting Started booklet.
  36.  
  37. A full installation of the C Set ++ files requires approximately 47MB of disk
  38. space, broken down in the following manner:
  39.  
  40. WorkFrame/2             1.8MB
  41. Toolkit                 25.4MB
  42. C/C++ FirstStep Tools   19.5MB
  43.  
  44. When you install each component, the installation program tells you how much
  45. space you have available on the selected drive and how much space is required
  46. for the options you select.
  47.  
  48. To effectively use the C/C++ FirstStep compiler and debugger, you need a
  49. minimum of 8M of RAM for C applications and 12M for C++ applications.
  50.  
  51. INSTALLATION NOTES
  52.  
  53. 1.  If problems occur, make sure the HELP environment variable points to
  54.     the d:\OS2\HELP directory (where "d" is the startup drive).
  55.  
  56. 2.  If you installed Version 1.0 of the C Set/2* product or Version 2.x of
  57.     the C Set ++* product, make sure that the directories for C Set ++
  58.     FirstStep come before their earlier counterparts in the following
  59.     statements in your CONFIG.SYS file:
  60.  
  61.     o  PATH
  62.     o  DPATH
  63.     o  LIB
  64.     o  ICLUDE
  65.     o  LIBPATH
  66.     o  BOOKSHELF
  67.     o  HELP
  68.  
  69.     If you change these environment variables frequently, you may want to
  70.     erase the earlier versions of the files to ensure you do not access them
  71.     before the C Set ++ FirstStep versions.
  72.  
  73. 3.  Ensure that you add the d:\TOOLKT21\CPLUS\OS2H directory (where "d" is
  74.     the drive where you installed the Toolkit) to the beginning of your
  75.     INCLUDE variable.  This directory must precede the d:\TOOLKT21\C\OS2H
  76.     directory.
  77.  
  78. 4.  If you are using OS/2 2.0, ensure that you are using the LINK386 linker
  79.     from the Developer's Toolkit 2.1, not the one from the operating system.
  80.  
  81. 5.  To use the context-sensitive help feature in EPM, you must either add the
  82.     d:\TOOLKT21\BOOK directory (where "d" is the drive where you installed
  83.     the Toolkit) to your DPATH variable or copy the EPMKWHLP.NDX file to a
  84.     directory specified in your DPATH.
  85.  
  86. 6.  The C/C++ FirstStep Tools installation program shows a negative value if
  87.     the space available is greater than or equal to 2GB.
  88.  
  89. 7.  The C Set ++ FirstStep folder icon created by the installation is not
  90.     displayed in the OS/2* 2.0 operating system.  It should display after the
  91.     operating system is restarted.  This should not happen with the OS/2 2.0
  92.     first Service Pack, Pre-installed OS/2 2.0, or OS/2 2.1.
  93.  
  94. 8.  C/C++ FirstStep Tools 2.01 and WorkFrame/2 1.1 installations do not
  95.     support the HPFS file names with imbedded spaces.
  96.  
  97.  
  98. IF YOU HAVE THE CD-ROM VERSION
  99. ______________________________
  100.  
  101. If you have the CD-ROM version of C Set ++ FirstStep, you can create
  102. diskettes from the CD-ROM for backup purposes, or to allow you to install on
  103. a workstation without a CD-ROM drive.  For more information on how to do
  104. this, see the READ ME file in the "IMAGES" directory of the CD-ROM.
  105.  
  106. NOTE:  Refer to the License Information document to ensure that you observe
  107. licensing restrictions when creating and using the diskette images.
  108.  
  109.  
  110. RELEASE CONSIDERATIONS AND NOTES
  111. ________________________________
  112.  
  113.  
  114. This section lists changes that have been made which could not be incorpo-
  115. rated into the documentation and additional information that you may need
  116. while using the C Set ++ FirstStep product.
  117.  
  118.  
  119. C/C++ COMPILER
  120. ______________
  121.  
  122. 1.  The documentation states that you cannot call a destructor between a
  123.     longjmp and the corresponding setjmp in a stack frame.  This
  124.     restriction no longer exists.  However, you should only call setjmp
  125.     from within C compiled code; otherwise, the destructor may delete
  126.     automatic objects in the function that contains the setjmp call.
  127.  
  128. 2.  On OS/2 2.0, when you use code pages other than 437, messages retrieved
  129.     using DosGetMessage are prefixed with "SYS" instead of the correct
  130.     prefix "EDC".
  131.  
  132. 3.  If your DLLs export any functions that could be a match for template
  133.     functions, you must build an import library.
  134.  
  135. 4.  16-bit functions have been labelled in the .DEF files.  If you want to
  136.     build a pure 32-bit DLL, delete all of the 16-bit exports and refer to
  137.     the chapter "Building DLLs" in the Programming Guide.
  138.  
  139. 5.  When you link C++ code, a common linker error is:
  140.  
  141.          X::virtual-fcn-table-ptr: undefined symbol
  142.  
  143.     where "X" is the name of a class, or "{X}Y", where both "X" and "Y" are
  144.     class names.
  145.  
  146.     The missing "virtual-fcn-table" for a class is a compiler-generated data
  147.     structure that is used to implement virtual function calls for that
  148.     class.  The compiler has to determine which compilation unit it should
  149.     generate each table in.  Often, the compiler generates the table in the
  150.     compilation that contains your definition of a selected virtual function.
  151.     If you never define that function, the table is never generated, and the
  152.     result is this linker error.
  153.  
  154.     Recompile your code with the /Wvft+ option.  The compiler will produce
  155.     an informational message as follows:
  156.  
  157.          EDC3281: informational The virtual function table for X will be
  158.          defined where <X::foo()> is defined.
  159.  
  160.     You will likely find that the function "X::foo()" has not been defined
  161.     anywhere.
  162.  
  163. 6.  The compiler reserves OS/2 exceptions with a facility code of 2 (that is,
  164.     exceptions 0x00020000 to 0x0002FFFF) for its own use.  The generation or
  165.     handling of these exceptions may lead to unpredictable and undefined
  166.     behavior.
  167.  
  168. 7.  If you receive the following message:
  169.  
  170.                    DDE4MNCH: cannot run "lib.exe"
  171.  
  172.     one of the following has occurred:
  173.  
  174.     o   LIB.EXE is not on your specified PATH.
  175.     o   There is a network error with a directory on your PATH before the
  176.         directory for LIB.EXE.
  177.  
  178. 8.  Precompiled Header Files
  179.  
  180.     Precompiled header files improve compile-time performance for headers
  181.     that are included many times in an application.  This improvement is
  182.     achieved by converting the header to a form that the compiler can process
  183.     more efficiently.
  184.  
  185.     When used together, the compiler options /Fi and /Si provide automatic
  186.     maintenance of up-to-date precompiled headers.  You should use these
  187.     options once the headers in the application are relatively stable
  188.     because:
  189.  
  190.     o   A new precompiled version of a header is created every time it is
  191.         changed.  If headers change with each compilation, the compilation
  192.         time may increase.
  193.  
  194.     o   Debugging is more difficult.  Listings are not available for these
  195.         headers and coordinates provided by compiler error messages are less
  196.         accurate.
  197.  
  198.     The compiler options are all that is required to use precompiled header
  199.     files.  No additional rules are required in your make files for keeping
  200.     the precompiled headers up to date.  The compiler does this
  201.     automatically.
  202.  
  203.     Keep in mind that precompiled header files occupy space in your file
  204.     system.  Typically, the size of a precompiled header is close to the size
  205.     of the original.
  206.  
  207.     The improvement in compile time using precompiled headers varies between
  208.     applications.  Factors that influence the amount of improvement include:
  209.  
  210.     o   The amount of code in headers and the amount of code in the source
  211.         file.
  212.         Because only the headers are precompiled, large source files show
  213.         less improvement in compile time.
  214.  
  215.     o   The language (C or C++).
  216.         Because C++ is more complex to compile, C applications generally show
  217.         more compile-time improvement than C++ applications.
  218.  
  219.     Using preprocessor conditional compilation to protect header files is of
  220.     particular benefit when you use precompiled headers.  Preprocessor
  221.     conditionals are coded as in the following example:
  222.  
  223.          #ifndef UNIQUE_HEADER_ID
  224.          #define UNIQUE_HEADER_ID
  225.  
  226.             /* Header contents */
  227.  
  228.          #endif
  229.  
  230.     Header files protected in this way get maximum precompilation benefit
  231.     when they are included more than once during a compilation.
  232.  
  233. 9.  If you specify a compiler option that is not supported or does not exist,
  234.     the compiler generates a warning message.  However, if you specify /O (in
  235.     uppercase) as a compiler option, no warning message is generated although
  236.     /O is not a supported option.  There is no effect on the compilation of
  237.     your code.
  238.  
  239.  
  240. DOCUMENTATION
  241. _____________
  242.  
  243. If you are running on OS/2 2.0 GA or OS/2 2.0 with the Service Pack, you may
  244. encounter a problem with the cross-document links in the .INF files.  In
  245. some cases, Help Manager does not interpret these links properly and, instead
  246. of going to the right panel, it opens a second instance of the document being
  247. viewed and pops up a "Link not found" message.  If this happens, close the
  248. extra copy of the INF file; otherwise, you may end up with a number of
  249. copies open and run out of memory.  To get to the panel you wanted to see, go
  250. through the Table of Contents, or use the Search facility.
  251.  
  252.  
  253. DEBUGGER
  254. ________
  255.  
  256. o   PREPARATION
  257.  
  258.     1.  IPMD.EXE requires fixed-pitch bitmapped fonts, which are part of
  259.         the OS/2 installation.
  260.     2.  Debugging of code generated with the /G5 option is not supported.
  261.         However, the only problem that has been noted to date is a failure to
  262.         produce a disassembly or mixed view for some programs.
  263.     3.  Although debugging inlined code is supported, inlined code may have a
  264.         different appearance than non-inlined code when you debug it.  Calls
  265.         to inlined functions may appear as non-executable statements.  When
  266.         you step through the inlined call, the source view changes to show
  267.         the statements of the inlined function, and you step through the
  268.         statements.  You may not be able to set breakpoints at the function
  269.         entry or on lines within an inlined function.
  270.  
  271. o   ENVIRONMENT VARIABLES
  272.  
  273.     A new environment variable has been added, "PMDTABGRID", that you can use
  274.     to define tab stops at a particular interval.  For example,
  275.     "SET PMDTABGRID=5" causes text after a tab to begin in columns 6, 11,21,
  276.     16, 26, and so on.
  277.  
  278. o   EXECUTION CONTROL
  279.  
  280.     STEP
  281.  
  282.     1.  Programs that use floating-point instructions and run on a machine
  283.         without a math coprocessor cannot single step consistently across
  284.         floating-point instructions.
  285.     2.  Use Step Over (Ctrl-O) to step past a DosReleaseMutexSem or a
  286.         DosRequestMutexSem.  Do not use Step Debug (Ctrl-D) in this
  287.         situation.
  288.     3.  When you step over a throw statement, the debugger runs to the end
  289.         of the program unless you set a break point in the catch clause or
  290.         at some point after the catch clause.
  291.  
  292.     MONITORS/REGISTERS/STACK/STORAGE
  293.  
  294.     1.  The pointer-to-member operator is not supported.
  295.     2.  To typecast a pointer in a monitor window, you must have defined the
  296.         type using a typedef.  You can cast a variable only to a type that
  297.         has been referenced in the object module.
  298.     3.  When you view the stack, only the stack associated with the current
  299.         ring is shown.  Therefore, if the application is stopped in ring 2,
  300.         you do not see the ring 3 stack.
  301.  
  302.     SOURCE WINDOW
  303.  
  304.     The debugger now supports executable code in included files.  You can
  305.     view the source as a notebook, with the source file names on the tabs.
  306.     There is an option to turn off the notebook (in the Source Window
  307.     Properties window).  However, if the program stops because of a
  308.     breakpoint or exception in an included file, the source window is
  309.     displayed as a notebook to show the current line, regardless of the
  310.     notebook option selected.  Similarly, if a routine is on the stack and
  311.     that routine has code in an included file, double-clicking on the
  312.     routine name brings up the source window in the notebook format.
  313.  
  314.  
  315. OPERATING SYSTEM NOTES
  316.  
  317. 1.  When debugging a Presentation Manager* (PM) application, IPMD may display
  318.     the message "PM Resource Interlock" or "DosDebug Error".  This is due to
  319.     a design limitation in OS/2.  OS/2 applications have access to system
  320.     semaphores, and when the application stops (such as when a breakpoint is
  321.     hit), a system semaphore contention problem can develop within the
  322.     operating system.  Some IPMD users have received the PM Resource
  323.     Interlock message on OS/2 2.1 while debugging applications that did
  324.     not encounter the condition on OS/2 2.0.
  325.  
  326.     Work is in progress on a fix to OS/2 that will alleviate this problem in
  327.     some situations, particularly for drag/drop and scroll operations.  The
  328.     fix is unlikely to prevent all possible PM Resource Interlock conditions.
  329.     You may be able to work around the problem by moving breakpoints around
  330.     slightly, or by toggling the PM Debugging Mode (changing from synchronous
  331.     to asynchronous, or vice versa).
  332.  
  333. 2.  If you are debugging with an XGA* display, the window from which you
  334.     invoked IPMD.EXE may not return to the OS/2 prompt when you close the
  335.     debugger.  To recover, select any OS/2 full screen prompt to free up the
  336.     window.
  337.  
  338. 3.  If a program uses DosRaiseException to raise an exception, the debugger
  339.     will not run the exception handlers.  A selective fix is available for
  340.     the OS/2 2.0 Service Pack.  Call 1-800-237-5511 with your customer number
  341.     and reference PJ05512 to obtain the selective fix.  You must set the
  342.     environment variable "SET PMDOS21=1" to take advantage of this fix.
  343.  
  344. 4.  The Message Queue Monitoring Function has an automatic column resizing
  345.     option from the display style dialog.  This menu item is not available on
  346.     OS/2 2.0.
  347.  
  348. 5.  Certain combinations of display drivers and fonts can result in a blank
  349.     source window.  If this occurs, change the font size.
  350.  
  351. 6.  On OS/2 2.0 with Service Pack, there is a problem when the storage window
  352.     is in insert mode.  Set the environment variable "SET PMDOSSP=1" to
  353.     eliminate the problem.
  354.  
  355. 7.  When debugging a Presentation Manager application in synchronous mode,
  356.     you may experience problems with other multithread PM applications
  357.     running in the background that send messages between threads.
  358.  
  359. 8.  The Debug Session Control window gives you a list of object files for
  360.     your executable.  There is a known linker problem that can cause a file
  361.     name to have invalid characters in it.  This problem is infrequent and
  362.     does not interfere with the debugger's function.
  363.  
  364. 9.  If the Desktop Automatic Lockup feature is enabled and the debugger is
  365.     active, the system will permanently lock up when the timer expires.  If
  366.     this happens, the only solution is to reboot.
  367.  
  368. 10. If you use a screen saver program, you may need to disable it to use
  369.     IPMD.
  370.  
  371. 11. If you installed MMPM/2, you may have problems running IPMD on applica-
  372.     tions that use sound.  You may need to de-install the sound portion of
  373.     MMPM/2 using DINSTSND.CMD.
  374.  
  375.  
  376. HINTS AND SUGGESTIONS
  377.  
  378. 1.  Debugging Child Processes
  379.  
  380.     To debug a child process, start the debugger with the name of the child
  381.     as the argument (that is, change "DosExecPgm <child>" to
  382.     "DosExecPgm ipmd <child>").
  383.  
  384. 2.  Debugging REXX DLLs
  385.  
  386.     a.  Start IPMD.EXE with the command line:
  387.  
  388.              ipmd cmd.exe /K <your rexx.cmd>"
  389.  
  390.     b.  When IPMD.EXE displays the code for CMD.EXE, set a load-type
  391.         breakpoint to stop when the DLL is loaded.
  392.     c.  Run.
  393.     d.  When the breakpoint is hit, open the desired component in the DLL and
  394.         set breakpoints.
  395.  
  396. 3.  Debugging WorkPlace Shell* Objects
  397.  
  398.     a.  Replace the RUNWORKPLACE line in your CONFIG.SYS file with:
  399.  
  400.              SET RUNWORKPLACE=C:\OS2\CMD.EXE
  401.  
  402.     b.  In an OS/2 window, type:
  403.  
  404.              ipmd c:\os2\pmshell
  405.  
  406.     c.  Set a load-type breakpoint for the DLL containing the WPS program.
  407.     d.  When the breakpoint is hit, open the desired component in the DLL and
  408.         set breakpoints.
  409.  
  410. 4.  Printing debugger screens
  411.  
  412.     If you have an active printer driver loaded under OS/2 and the printer
  413.     can print in graphics mode, you can print the debugger screen with the
  414.     current focus by pressing the Print Screen key.
  415.  
  416. 5.  The debugger uses DosStartSession to start the program being debugged.
  417.     DosStartSession may give error messages which you do not see when the
  418.     program is run outside the debugger.  Two common errors are:
  419.  
  420.     "PROGRAM NOT LOADED.  DOSSTARTSESSION FAILED (RC=2)."
  421.        This error indicates that DosStartSession could not find one of the
  422.        DLLs referenced in your program.
  423.  
  424.     "PROGRAM NOT LOADED.  DOSSTARTSESSION FAILED (RC=127)."
  425.        This error indicates that DosStartSession found the DLL but could not
  426.        find one of the exported entry points.
  427.  
  428.        It may mean that the LIB does not match the DLL, or that "/IGNORECASE"
  429.        was used improperly.  The loader is case-sensitive, and it may fail to
  430.        find an entry if you are running the linker as case-insensitive.
  431.  
  432.  
  433. COLLECTION CLASS LIBRARIES
  434. __________________________
  435.  
  436. 1.  When you use the Collection class library, compile your code with
  437.     with /Sp4 option to align structures and unions along 4-byte boundaries
  438.     (this is the default).  If you use a different /Sp option, you must use
  439.     #pragma pack around the #include directives for the Collection class
  440.     header files to ensure that they are aligned correctly.  For example:
  441.  
  442.        #pragma pack(4)
  443.        #include <iset.h>
  444.        #pragma pack()
  445.  
  446. 2.  If you intend to use the extensive compiler diagnostic messages
  447.     (using the /Wgrp compiler option or the #pragma info directive),
  448.     use #pragma info to suppress the generation of warning messages from
  449.     the included Collection class library code.  For example:
  450.  
  451.        #pragma info(none)
  452.        #include <iset.h>
  453.        #pragma info(restore)
  454.  
  455.