SEARCH CONTACT US SUPPORT SERVICES PRODUCTS STORE
United States    
COMPAQ STORE | PRODUCTS | SERVICES | SUPPORT | CONTACT US | SEARCH
cxxtitle

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


PRODUCT INFORMATION

  1. Which versions of the compilers are currently available?
  2. Are the compilers Year 2000 Ready?
  3. What are your plans regarding implementation of the C++ International Standard?
  4. What are your plans regarding implementation of full 64-bit support for C++ on OpenVMS Alpha?
  5. 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?
  6. Can the C/C++ team keep me informed about new releases?
  7. Which documentation is available? In which formats? How can I obtain it?
  8. Which technical support options are available?

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:

SYS$COMMON:[SYSHLP.CXX$HELP]INDEX.HTM

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:

  • QA-0HQAA-GZ (OpenVMS Alpha)
  • QA-MJ1AA-GZ (OpenVMS VAX)

These kits contain the following documents:

  • RBI Letter
  • Using Compaq C++
  • Compaq C++ Installation Guide
  • Compaq C Run-Time Library Reference Manual
  • The C++ Programming Language, 3rd edition, by Bjarne Stroustrup.

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.


TECHNICAL QUESTIONS
  1. Which elements of the C++ International Standard are not yet supported?
  2. Does the compiler support precompiled headers?
    [C_PLUS_PLUS 4024]
  3. Why does check < int > (d) produce the error message
    'Type not followed by "(" in an expression' ?

    [C_PLUS_PLUS 4169]
  4. Why can't I compile /template_define=all for the Standard Library?
    [C_PLUS_PLUS 4133]
  5. Why does the compiler generate an undefined identifier error for a variable I've declared on a for loop?
    [C_PLUS_PLUS 4133]
  6. Why does the compiler generate undefined symbols for functions taking pointer to functions? [C_PLUS_PLUS 4087]
  7. How do I link C++ with another language?
    [C_PLUS_PLUS 3687]
  8. Why does the compiler generate an undefined symbol WHAT__K9BAD_ALLOCXV? [C_PLUS_PLUS 3759]
  9. Why must classes reside in headers for automatic template instantiation?
    [C_PLUS_PLUS 3245]
  10. Why does the compiler generate undefined template symbols?
    [C_PLUS_PLUS 3245]
  11. Why does the compiler generate duplicate symbol errors when I use automatic instantiation? [C_PLUS_PLUS 4245]
  12. What should I do when I see the following error?
    [C_PLUS_PLUS 4000]
    Fatal:  Insufficient virtual memory to continue compilation. 
    %LIB-F-INSVIRMEM, insufficient virtual memory 
    
  13. Why do I get compilation errors from a Standard Library header file?
    Why is /assume=noheader_type_default needed?

    [C_PLUS_PLUS 3556]
  14. 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?
    [C_PLUS_PLUS 3598, 4645]
  15. Can I redistribute CXXLINK?
    [C_PLUS_PLUS 4622]
  16. Why do I "get unresolved symbol" link errors when I compile with /names=as_is?
    [C_PLUS_PLUS 4600]
  17. Why does the compiler fail to handle correctly include path constructs of the form ((#include ))?
  18. Can I install multiple versions of the compiler on a single system?

TECHNICAL QUESTIONS

Q: Which elements of the C++ International Standard are not yet supported?

A: The following items, specified in the C++ International Standard, are not supported in Version 6.3 but will be supported in a future version. Details about each item are provided in the indicated sections of the C++ International Standard document and The C++ Programming Language, 3rd Edition, by Bjarne Stroustrup.
  • The export keyword for templates (Standard §14, paragraph 6; Stroustrup §9.2.3)
  • <cname> version of headers (Standard §17.4.1.2; Stroustrup §16.1.2)

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:
extern "C" void f1(void (*pf)(int)); 
         // the name f1 and its function type have C linkage;
         // pf is a pointer to a C function

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.

// func.h

extern "C"
{
void Test_OK(char *msg);
typedef void (*fp)(char*);
void Test_Not_OK(fp);
}

// func.cpp
#include <func.h>

void Test_Not_OK(fp errFunc)
{
  errFunc("Test not OK");
}

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?
Q: Why does the compiler generate undefined template symbols?

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:


mynode> cxx -o tt m.cxx m2.cxx t.cxx
m.cxx:
m2.cxx:
t.cxx:
ld (prelink):
m2.o compressed: worker_function(void): multiply defined
t.o compressed: worker_function(void): multiply defined
ld (prelink):
m2.o compressed: worker_function(void): multiply defined
t.o compressed: worker_function(void): multiply defined
ld:
m2.o compressed: worker_function(void): multiply defined
t.o compressed: worker_function(void): multiply defined

mynode> nm m.o | grep worker
worker_function(void)            | 0000000000000080 | T | 0000000000000008
mynode> nm m2.o | grep worker
worker_function(void)            | 0000000000000064 | T | 0000000000000008
mynode> nm t.o | grep worker
worker_function(void)            | 0000000000000000 | T | 0000000000000008

mynode> cat t.h
#ifndef T_H
#define T_H
template  void f(const T);
#endif

mynode> cat t.cxx
#include "t.h"

void worker_function() { }

template  void f(const T) { worker_function(); }

mynode> cat m.cxx
#include "t.h"

extern void m2();

void main()
{
  f(1);
  m2();
}

mynode> cat m2.cxx
#include "t.h"

void m2()
{
  f("hello");
}

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?
Fatal:  Insufficient virtual memory to continue compilation. 
%LIB-F-INSVIRMEM, insufficient virtual memory 
A: Consider raising your quota. You can enter the command show process/quota to show your current quota. And look at the SYSGEN parameter VIRTUALPAGECNT. Increasing quotas does not help unless the value for that parameter is sufficient.

Q: Why do I get compilation errors from a Standard Library header file?
Q: Why is /assume=noheader_type_default needed?

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:

  • Searches for and adds template instantiations, if needed
  • Adds sys$library:libcxxstd.olb to the linker input

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 ((#include ))?

A: A place containing a forward slash (/) character is considered to be a UNIX-style name. If the name in the (#include) directive also contains a "/" character that is not the first character and is not preceded by a an exclamation mark character (!) (that is, it is not an absolute UNIX-style pathname), the name in the (#include directive) is appended to the named place, separated by a "/" character, before applying the (decc$to_vms) pathname translation function.

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].

If you find that Version 6.n requires excessive changes to your applications even when you use the /standard=arm option, or if you encounter problems using the Version 6.n compiler, you can return to your previous C++ environment by invoking the command procedure


       SYS$COMMON:[CXX0nn]COMPILER_SETUP.COM

where nn specifies the version of your previous compiler.

  

1.800.AT.COMPAQ

privacy and legal statement