Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home

HP aC++ User's Guide: HP-UX Systems

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

HP Part Number: B3901-90008

Edition: Edition 1

Published: August 2003


Table of Contents

About This Document
Intended Audience
What’s in This Document
Typographical Conventions
HP-UX Release Name and Release Identifier
Publishing History
Related Documents
HP Encourages Your Comments
1 Getting Started
Components of the Compiling System
Using the aCC Command
Compiling a Simple Program
Executing the Program
Debugging Programs
Compiler Command Syntax
Examples of the aCC Command
Files on the aCC Command Line
C++ Source File (.C file)
Preprocessed Source Files (.i Files)
Assembly Language Source Files (.s Files)
Object Files (.o Files)
Library Files (.sl or .a Files)
Environment Variables
CXXOPTS Environment Variable
CCLIBDIR Environment Variable
CCROOTDIR Environment Variable
TMPDIR Environment Variable
Floating Installation
Setting up Floating Installation
2 Command Line Options
Options to Control Code Generation
-c Command Line Option
+DOosname Command Line Option
+DData_model Command Line Option
+DSmodel Command Line Option
-S Command Line Option
Data Alignment and Storage
Debugging Options
+d Command Line Option
-g Command Line Option
-g0 Command Line Option
-g1 Command Line Option
Differences Between -g, -g0, and -g1 Options
When to Use -g, -g0, and -g1
-g, -g1 Algorithm
+[no]objdebug Command Line Option
Error Handling
+p Command Line Option
-w Command Line Option
Exception Handling
+noeh Command Line Option
Extensions to the Language
-ext Command Line Option
+e Command Line Option
Floating Point Processing
+O[no]cxlimitedrange Command Line Option
+O[no]fenvaccess Command Line Option
-fpeval Command Line Option
-[no]fpwidetypes Command Line Option
+FP Command Line Option
+O[no]libmerrno Command Line
+prefetch_latency Command Line Option
+O[no]preserverd_fpregs Command Line
+O[no]rotating_fpregs Command Line Option
Header File Options
-I directory Command Line Option
-I- Command Line Option
Online Help Option
+help Command Line Option
Inlining Options
+inline_level[i]num Command Line Option
Libraries
+A Command Line Option
-b Command Line Option
-dynamic Command Line Option
-exec Command Line Option
-lname Command Line Option
-L directory Command Line Option
-minshared Command Line Option
+nostl Command Line Option
Linker Options
-n Command Line Option
-N Command Line Option
-q Command Line Option
-Q Command Line Option
-r Command Line Option
-s Command Line Option
-u Command Line Option
+ild Command Line Option
+ildrelink Command Line Option
Options for Naming the Output File
-eepsym Command Line Option
-o Command Line Option
-.suffix Command Line Option
Native Language Support Option
-Y Command Line Option
Handling Null Pointers Options
-z Command Line Option
-Z Command Line Option
Code Optimizing Options
Basic Optimization Level Options
Additional Optimizations for Finer Control
Advanced +Ooptimization Options
Profile-Based Optimization Options
Displaying Optimization Information
Parallel Processing
-mt Command Line Option
Performance Options
-fast Command Line Option
+Ofast Command Line Option
+Ofaster Command Line Option
+[no]srcpos Command Line Option
+DSmodel Command Line Option
Porting Options
-fast Command Line Option
+sb Command Line Option
+ub Command Line Option
+ub Command Line Option
Preprocessor Options
-C Command Line Option
-Dname Command Line Option
-E Command Line Option
+m[d] Command Line Option
+M[d] Command Line Option
-P Command Line Option
-Uname Command Line Option
Profiling Code Options
-G Command Line Option
-p Command Line Option
+profilebucketsize Command Line Option
Standards Related Options
-Aa Command Line Option
-AA Command Line Option
-AC89 Command Line Option
-AC99 Command Line Option
-Ae Command Line Option
-AOa and -AOe Command Line Options
-AP Command Line Option
+legacy_hpc Command Line Option
+legacy_cpp Command Line Option
-Wc,-ansi_for_scope,[on][off] Command Line Option
-Wc,-koenig_loopup,[on][off] Command Line Option
Subprocesses of the Compiler
-tx,name Command Line Option
-Wx,args Command Line Option
Symbol Binding Options
-Bdefault Command Line Option
-Bextern Command Line Option
-Bhidden Command Line Option
-Bprotected Command Line Option
-Bprotected_data Command Line Option
-Bprotected_def Command Line Option
-Bsymbolic Command Line Option
Template Options
+inst_compiletime Command Line Option
+inst_directed Command Line Option
+inst_implicit_include Command Line Option
+inst_include_suffixes Command Line Option
Verbose Compile and Link Information
+dryrun Command Line Option
+O[no]clone Command Line Option
+O[no]info Command Line Option
+time Command Line Option
-v Command Line Option
-V Command Line Option
Concatenating Options
Diagnostic Messages
aCC Message Catalog
Frequently Encountered Messages
Pragma Directives
Initialization and Termination Pragmas
Copyright Notice and Identification Pragmas
Data Alignment Pragmas
Optimization Pragmas
Other Pragmas
OpenMP Clauses
3 Preprocessing Directives
Overview of the Preprocessor
Syntax
Usage Guidelines
Source File Inclusion (#include)
Macro Replacement (#define, #undef)
Assertions (#assert, #unassert)
Conditional Compilation (#if, #ifdef, .. #endif)
Line Control (#line)
Pragma Directive (#pragma)
Error Directive (#error)
Warning Directive
Trigraph Sequences
Examples
Using HP aC++ Templates
Invoking Compile-time Instantiation
Scope and Precedence
Template Processing
Explicit Instantiation
Command-Line Option Instantiation
Compile-time Instantiation
Migrating from Automatic Instantiation to Compile-time Instantiation
C++ Template Tutorial
4 Exception Handling
Exception Handling
Exception Handling in C++
Exception Handling as Defined by the ANSI/ISO C++ International Standard
Basic Exception Handling Example
Function Try Block Examples
Debugging Exception Handling
Performance Considerations
Using Threads
Rogue Wave Standard C++ Library 2.2.1
Rogue Wave Standard C++ Library 1.2.1 and Tools.h++ 7.0.6
Using Locks
Required Command-line Options
Limitations
Exception Handling
Parallel Programming Using OpenMP
OpenMP Implementation
Environment Variables in OpenMP
Runtime Library Functions in OpenMP
Execution Environment Functions
Lock Functions
Timing Functions
5 Optimizing HP aC++ Programs
Requesting Optimization
Setting Basic Optimization Levels
Level 1 Optimization
Level 2 Optimization
Level 3 Optimization
Level 4 Optimization
Additional Options for Finer Control
Enabling Aggressive Optimizations
Enabling Only Conservative Optimizations
Removing Compilation Time Limits When Optimizing
Limiting the Size of Optimized Code
Specifying Maximum Optimization
Combining Optimization Options
Profile-Based Optimization
Instrumentation
Collecting Data for Profiling
Performing Profile-Based Optimization
Pragmas That Control Optimization
6 Tools and Libraries
HP Specific Features of lex and yacc
Creating and Using Libraries
HP aC++ Libraries
Creating and Using Shared Libraries
Advanced Shared Library Features
Standard HP-UX Libraries and Header Files
HP aC++ File Locations
HP aC++ Executable Files
HP aC++ Run-time Libraries and Header Files
7 Mixing C++ with Other Languages
Calling Other Languages
Data Compatibility between C and C++
HP aC++ Calling HP C
Using the extern "C" Linkage Specification
Syntax of extern "C"
Examples of extern "C"
Differences in Argument Passing Conventions
The main() Function
Examples: HP aC++ Calling HP C
HP C Calling HP aC++
Compiling and Running the Example Programs
Calling HP Pascal and HP FORTRAN 90 from HP aC++
The main() Function
Function Naming Conventions
Using Reference Variables to Pass Arguments
Using extern "C" Linkage
Strings
Arrays
Definition of TRUE and FALSE
Files in FORTRAN
Files in Pascal
Linking HP FORTRAN 90 Routines
Linking HP Pascal Routines
Distributing Your C++ Products
Applications that use HP aC++ Shared Libraries
Linking Your HP aC++ Libraries with Other Languages
Installing your Application
HP aC++ Files You May Distribute
Terms for Distribution of HP aC++ Files
Index
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.