United States |
Frequently Asked Questions
|
This collection of frequently asked questions (FAQ) provides brief answers to
questions about the C++ compiler product.
If you need to contact Compaq Customer Support about a technical question,
you can cite the identifier, enclosed in brackets, that follows the question.
Questions are followed by an answer (A:); some questions
also have a solution (S:), a workaround (W:),
or both.
Please select
Q: Which versions of the compilers are currently available? A: Several versions are available, depending on your operating system. For current version and pricing information, call 1.800.AT.COMPAQ (1.800.282.6672) or contact your local business partner. You can also visit the Compaq C++ for OpenVMS web site and the OpenVMS Enterprise Computing web site, Software Products Supporting OpenVMS Version 6.2 and Higher, which are always up to date. Q: Are the compilers Year 2000 Ready? A:
For complete information, see the Compaq Year 2000 Page.
Q:
What are your plans regarding implementation of the C++ International
Standard? A:
Over the past several years, we have led the industry in
implementing the standard, with the goal of being fully ANSI/ISO compliant.
Q:
What are your plans regarding implementation of full 64-bit support for
C++ on OpenVMS Alpha? A:
C++ engineering is currently assessing this important issue.
Q:
I notice that you use the Standard Library from Rogue Wave.
Which other Rogue Wave Libraries do you support? Can I obtain Tools.h++ for OpenVMS? A:
Compaq supplies the C++ Standard Library (based on Rogue Wave sources)
with the C++ compiler. This library includes what used
to be known as the Standard Template Library (STL).
To obtain Tools.h++ or any other Rogue Wave
product, you can contact Rogue Wave directly.
Q: Can the C/C++ team keep me
informed about new releases? A: If you'd like to keep
informed, you can visit the
Compaq
C++ for OpenVMS web site
and click on Register With Us!.
Both the Compaq
C++ for OpenVMS web site and the OpenVMS Enterprise Computing web site,
Software Products Supporting OpenVMS
Version 6.2 and Higher, contain up-to-date product information.
Q: Which documentation is available? In
which formats? How can I obtain it? A: The documentation is packaged as part of the
binary kit, and is available in HTML, PostScript, and text format. After installation, you can view the HTML documentation by pointing your browser to
the directory/file on the system where the kits are installed:
You can preview the documentation on
the Compaq C++ for OpenVMS
web site.
To obtain a complete C++ hardcopy documentation set, call 1.800.AT.COMPAQ
and request one or both of the following:
These kits contain the following documents:
The RBI Letter, Using Compaq C++, and Installation Guide documents are
specific to the operating system.
Release Notes, Software Product Description,
Class Library Reference Manual, Standard Library
Stream Input/Output, and Standard Library Locales
documents are available only online.
Q: Which technical
support options are available? A: Various 24x7 technical support
contracts are available. For contract information, call 1.800.AT.COMPAQ. Technical support
on a per-call basis is available at 1.800.354.9000.
Q:
Which elements of the C++ International Standard are not yet supported?
Q:
Does the compiler support precompiled headers?
A:
The compiler supports precompiled headers (PCH) on
Compaq Tru64 UNIX with Compaq C++ Version 6.0 or higher.
Support for precompiled headers on OpenVMS Alpha is not yet implemented.
Q:
Why does check < int > (d) produce the error message
'Type not followed by "(" in an expression' ?
A:
Explicit specification of function template arguments is not supported in
the Version 5.n compiler. It is only partially supported in
our latest Version 6.n compiler; that is, the explicit call syntax
works but is not useful because you must use the template argument
somewhere in the function declaration. The compiler cannot support
this feature without a change in the name mangling mechanism, which
would break backward link compatibility (link compatiblity between
object files built with Version 6.n and Version 5.n
compilers).
S:
The problem is corrected in Version 6.2.
Q:
Why can't I compile /template_define=all for the Standard Library?
A:
Because this option instantiates all templates, even those that are not used,
it is not guaranteed to work with the Standard Library.
For example, rb_tree (the underlying implementation of map and set) supports
a bidirectional iterator class. Thus, operator+,
operator-, operator<,
and operator> are not defined in the iterator for that class.
When you instantiate the tree with cxx/template_define=all,
the compiler tries to instantiate recursively everything that is typedef'ed,
even if not used.
Inside rb_tree there is a typedef for
std::reverse_iterator<iterator>, which then instantiates the global
class reverse_iterator with the
rb_tree iterator as the template argument
"RandomAccessIterator" (a misnomer in this case).
This condition causes undefined symbols for these operators, because
the symbols are used within the definition of the operator member functions inside
reverse_iterator.
As a result, the compiler attempts to instantiate them, even though
they do not exist.
Q:
Why does the compiler generate an undefined identifier error for a variable I've
declared on a for loop?
A:
The C++ International Standard has changed the scope rule for variable declared on
a for loop. According to the standard, the scope ends at the end of the
scope of the for loop. Compiling -std arm will give you the old ARM scoping
rules. See Handling Scope Issues in
Using Compaq C++ for OpenVMS Alpha.
Q:
Why does the compiler generate undefined symbols for functions taking pointer to
functions?
A:
The linkage of the function that is pointed to is now part of the
function type.
From Standard §7.5; Stroustrup §9.2.5:
In a linkage specification, the specified language linkage
applies to the function types of all function declarators,
function names, and variable names introduced by the declaration.
For example:
In the following example, the argument errFunc has C linkage in the
declaration but has C++ linkage in the definition in func.cpp.
As a result, the declaration and definition do not match.
S:
Create a typedef with either C or C++ linkage and use it as
the argument type.
Q:
How do I link C++ with another language?
A:
See Using Compaq C++ with Other Languages.
One caveat for linking with Fortran is that in many cases Fortran add
a trailing underscore to its external name. The extern C
declaration must include this underscore when you define an
external Fortran name. See -assume nounderscore in the Fortran f77
and f90 reference pages.
Q:
Why does the compiler generate undefined symbol WHAT__K9BAD_ALLOCXV?
A:
The library object file bv_inst.obj, which
was created incorrectly, contains an undefined symbol bad_alloc::what().
If you #include <vector>,
some inline functions in the bitvector class
(at the bottom of the vector header file) cause the linker to
require references from bv_inst.obj.
The unresolved error occurs when the linker includes that object file.
Though disconcerting, the linker error is harmless.
S:
This problem has been fixed in Version 6.0 of the Standard Library.
W:
In most cases, you can ignore the linker message.
It is a problem only if a shareable image is being created (because
any application linking against it also receives the warning).
Q:
Why must classes reside in headers for automatic template
instantiation?
A:
This was a limitation in the Version 5.n compilers that has been fixed in
the Version 6.n compilers. For more information about Version 5 template limitations,
see the discussion of templates in your Version 5.n
Using DEC C++ guide.
S:
Upgrade to Version 6.0 or higher.
Q:
Why does the compiler generate duplicate symbol errors when I use automatic
instantiation?
A:
This was a limitation in the Version 5.n compilers that has been fixed in
the Version 6.n compilers. For more information about Version 5 template limitations,
see the discussion of templates in your Version 5.n
Using DEC C++ guide.
Note also that you cannot do automatic template instantiation if you defined templates and
non-templates in the same module. This restriction applies because each time
the compiler needs the template implementation, it includes the module
that defines it. If that module contains non-template elements, these also are
defined, and duplicate symbols can be generated.
Consider the following example:
For information about where to place function definitions depending on whether
they are templatized, see
How to Organize Your C++ Code in
Using Compaq C++ for OpenVMS Alpha
S:
Upgrade to Version 6.0 or higher.
Q:
What should I do when I see the following error?
Q:
Why do I get compilation errors from a Standard Library header file? A:
OpenVMS users have been allowed to specify
#include <iostream>
or #include <vector>
to obtain the old iostream.hxx and
vector.hxx.
Options to the /assume qualifier
allow you to specify which version you want.
S:
/assume=noheader_type_default is the default
setting in Version 6.n.
Q:
Because the Standard Library does not ship with the operating system, how can
my customer obtain the library so that my application will link cleanly on his
system?
A:
You can redistribute the library under conditions specified in the
C++ Software Product Description.
For detailed information about how to do so, see Deploying Your
Application in Using Compaq C++ for OpenVMS Alpha.
Q:
Can I redistribute CXXLINK?
A:
You should not need to redistribute CXXLINK.
CXXLINK performs two major tasks:
If your application uses template instantiations, you would need to package files from
your [.cxx_repository] with the application
If your application uses std::new() and
exception support (required by most of the new Standard Library) you must also
package the contents of libcxxstd.olb.
You can perform a standard LINK operation to verify that everything works
correctly.
If the application is an installation-time link, the installation kit can include
a copy of libcxxstd.olb and provide it as input to the linker during
installation of the product -- the same is true for any instantiation files.
Use CXXLINK/LOG to see which operations
CXXLINK performs, and then have the installation procedure do the same.
Q:
Why do I "get unresolved symbol" link errors when I compile with
/names=as_is? A:
Version 6.n implements the new C++ International Standard,
which specifies that the compiler should
call new library run-time routines, such as
array new, that do not work
with /names=as_is.
If you want the old behaviour, specify either /standard=arm
or /assume=nostdnew along with
/assume=noglobal_array_new.
The problem will be corrected in a future release.
Q:
Why does the compiler fail to recognize include path constructs of the form
A:
A place containing a forward slash Q:
Can I install multiple versions of the compiler on a single system?
A:
The Version 6.n installation procedure checks whether a Version 5.3 to
5.6 compiler is installed on your system. If so, it asks whether you
want to save it, and where. The default save area for a
Version 5.6 compiler is SYS$COMMON:[CXX056].
|
|