Jump to 
content
HP.com Home Products and Services Support and Drivers Solutions How to Buy
»  Contact HP

 

HP C++

HP C++

Using HP C++ for Tru64 UNIX and Linux Alpha


August 2005

This manual contains information about developing HP C++ programs on HP Tru64 UNIX and Linux Alpha systems.

Software Version: HP C++ Version 7.1 for Tru64 UNIX
HP C++ Version 6.5 for Linux Alpha

Hewlett-Packard Company Palo Alto, California


© Copyright 2005 Hewlett-Packard Development Company, L.P.

Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license.

The information contained herein is subject to change without notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein.

Intel and Itanium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

UNIX is a registered trademark of The Open Group.

X/Open is a registered trademark of X/Open Company Ltd. in the UK and other countries.

Portions of the ANSI C++ Standard Library have been implemented using source licensed from and copyrighted by Rogue Wave Software, Inc.

Information pertaining to the C++ Standard Library has been edited and reprinted with permission of Rogue Wave Software, Inc. All rights reserved.

Portions copyright 1994-2002 Rogue Wave Software, Inc.

Printed in the US

Confidential computer software. Valid license from HP and/or its subsidiaries required for possession, use, or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendors standard commercial license.

Neither HP nor any of its subsidiaries shall be liable for technical or editorial errors or omissions contained herein. The information is provided "as is" without warranty of any kind and is subject to change without notice. The warranties for HP products are set forth in the express limited warranty statements accompanying such products. Nothing herein should be construed as constituting an additional warranty.

This document is available on CD-ROM. This document was prepared using DECdocument, Version 3.3-1n.

Contents Index


Preface

This manual contains information for developing and debugging HP C++ programs on Tru64 UNIX and Linux Alpha systems, and includes information on other Tru64 UNIX and Linux Alpha features and tools that work with HP C++.

Note

Most information in this manual applies to both the Tru64 UNIX and Linux Alpha platforms. The notation [Tru64] introduces information that applies only to Tru64 UNIX; the notation [Linux] introductes information that applies only to Linux Alpha.

Intended Audience

This manual is intended for experienced programmers who need to develop HP C++ programs on Tru64 UNIX and Linux Alpha systems. Users of this manual should have a basic understanding of the C++ language and some familiarity with the Tru64 UNIX and Linux Alpha operating systems.

Structure of this Document

This manual is organized as follows:

  • Chapter 1 shows how to create, compile, link, and run HP C++ programs.
  • Chapter 2 describes features and characteristics that are specific to the HP C++ implementation.
  • Chapter 3 describes how to modify existing C header files to be accepted by HP C++.
  • Chapter 4 contains tips for moving applications built with other C++ implementations to HP C++.
  • Chapter 5 describes how to use templates with HP C++.
  • Chapter 6 describes how to use precompiled headers with HP C++.
  • Chapter 7 describes the HP C++ implementation of the C++ Standard Library.
  • Chapter 8 explains how to use C++ exception handling.
  • Chapter 9 describes how to use the Ladebug debugger.
  • Appendix A describes Class Library restrictions.
  • Appendix B describes built-in functions.
  • Appendix C describes Third Degree messages generated by the C++ Class and Standard Libraries.
  • The cxx(1) reference page describes command line options.

Associated Documents

The following documents contain information associated with topics in this manual:

  • Stroustrup, Bjarne. The C++ Programming Language, 3rd Edition. Reading, Massachusetts: Addison-Wesley, 1997.
    Provides an exhaustive introduction to the C++ programming language, including sophisticated language features. This book also includes the text but not the annotations of The Annotated C++ Reference Manual.
  • C++ Class Library Reference Manual
    This manual describes the class library packages supplied with HP C++.
  • HP C++ Installation Guide for Tru64 UNIX
    This document supplies the information necessary to install HP C++. on Tru64 UNIX systems. Instructions for installing HP C++ on Linux Alpha systems are provided in a README document supplied with the C++ for Linux Alpha kit.
  • The AT&T C++ Language System, Release 2.0, Library Manual
    This document describes the AT&T class library package.

Related Documents

The following documents are not included in the HP C++ documentation set. Refer to them for additional information on the C++ programming language, HP C, or Tru64 UNIX and Linux Alpha programming.

  • Stroustrup, Bjarne and Margaret Ellis. The Annotated C++ Reference Manual. Reading, Massachusetts: Addison-Wesley, 1990.
    This text contains the current language definition of C++.
  • Carroll, Martin D. and Margaret E. Ellis. Designing and Coding Reusable C++. Reading, Massachusetts: Addison-Wesley, 1995.
    This text provides practical information for designing and implementing C++ programs.
  • Myers, Scott. Effective C++: 50 Specific Ways to Improve Your Programs and Designs, 3rd edition. Reading, Massachusetts: Addison-Wesley, 1997.
  • Myers, Scott. More Effective C++: 35 New Ways to Improve Your Programs and Designs. Reading, Massachusetts: Addison-Wesley, 1995.
    These texts provide practical information for designing and implementing C++ programs.
  • Tru64 UNIX Programmer's Guide
    This guide describes the programming environment on the Tru64 UNIX operating system, emphasizing the C programming language.
  • HP C Language Reference Manual
    Provides a complete technical description of the C language as specified by the ANSI X3J11 committee. This manual also fully describes all extensions to this standard implemented in HP C.
  • ULTRIX to Tru64 UNIX Migration Guide
    Describes how to migrate from an ULTRIX system to a Tru64 UNIX system. This book includes information on porting applications from ULTRIX to Tru64 UNIX systems.
  • International Standard ISO/IEC 14882
    Defines the C++ International Standard. The document is available for downloading at the ANSI Electronic Store (start at
    The printed version is also available for purchase from the same web site. Choose "Catalogs/Standards Information", then "ANSI-ISO-IEC Online Catalog", then search for "14882".

Conventions Used in this Manual

Table 1 lists the conventions used in this manual.

Table 1 Conventions Used in this Manual
Convention Meaning
% A percent sign (%) is the default user prompt.
class complex {
.
.
.
};
A vertical ellipsis indicates that some intervening program code or output is not shown. Only the more pertinent material is shown in the example.
,... A horizontal ellipsis in a syntax description indicates that you can enter additional parameters, options, or values. A comma preceding the ellipsis indicates that successive items must be separated by commas.
The generic class...
The get() function...
Monospaced type denotes the names of HP C++ language elements, and also the names of classes, members, and nonmembers. Monospaced type is also used in text to reference code elements displayed in examples and file-name extensions.
italic Italic type denotes the names of variables that appear as parameters or in arguments to functions, and also denotes book titles.
boldface Boldface type in text indicates the first instance of terms defined in text.
UPPERCASE
lowercase
The Tru64 UNIX and Linux Alpha operating systems distinquish between uppercase and lowercase characters. Literal strings that appear in text, examples, syntax descriptions, and function definitions must be entered exactly as shown.
cxx (1) Cross-references to reference pages include the appropriate section number in parentheses.

Reader's Comments

You may send comments or suggestions regarding this manual, or any HP C++ document, by electronic mail to the following Internet address:

c_docs@hp.com .

Include the title of the document, section and page number where the error occurred.

Product Support

Premium support is available on a per-incident basis



http://www.hp.com/hps/perevent/pv_software.html

and annual contracts



 http://www.hp.com/hps/os/os_tru64.html

from HP Services in the US and some other countries. In the US and Canada, call, toll-free, 1-800-354-9000. In other countries, support phone numbers are available on the web at:



http://welcome.hp.com/country/us/en/wwcontact.html

Free support is limited to bug reports that can be sent to



compaq_cxx.bugs@hp.com

Send a complete but short example reproducing the problem, including the following:

  • Compiler and operating system versions
  • All necessary sources (such as INCLUDE files and module sources)
  • Data files
  • Commands used to compile, link and run the program
  • Expected results and incorrect results obtained

Please try to reduce the problem to as small a source as possible, because we may be unable to diagnose large applications.

We answer most quickly those problem reports that include a small but complete reproducible example, along with descriptions of the compile and link options used and the exact text of any diagnostic messages or other incorrect results. Reports that include only program fragments or involve very large applications generally will not be accepted.

Please note that this is not a "programming consulting service" and that you should have clear evidence of a product problem before contacting us. If you need consulting services, please contact HP Services.


Next Contents Index

Privacy statement Using this site means you accept its terms
© 2005 Hewlett-Packard Development Company, L.P.