HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
Operating System - OpenVMS
Showing results for 
Search instead for 
Did you mean: 

C++ Template with string -> Compiler problem

Martin Krüger
Occasional Visitor

C++ Template with string -> Compiler problem


I'm Martin.
We are experiencing a compiler error with the following c++ line:

properties = new map;

properties is declared in the header as:
void* properties;

The funny thing now is, with our test-account it works, it compiles without any problems. Then there was a productive-account established and with that new account it does not compile with the errors attached in the txt-file. All on the same machine with the same compiler.

So we are using the C++ Standard Template in some other files too. There are no errors except we are using the Template with string ().

The accounts have been compared and are similar now (it seems). But still that compile error resists in the productive account.

Can it only be a permission problem of the users or what code issues can produce such a scenario ??

Thanks a lot in advance !

Craig A Berry
Honored Contributor

Re: C++ Template with string -> Compiler problem

I suggest a deeper comparison of the test environment with the production environment. For example, compare the section labeled "Command Line" near the end of the listing file and make sure all the same compiler options are being used in both places. Compare the values of relevant logical names such as SRV$COPYLIB. Add /SHOW=INCLUDE to the compiler options and compare the listings to see if they are really getting the same versions of the same include files.
Martin Krüger
Occasional Visitor

Re: C++ Template with string -> Compiler problem


so now I excluded the specific macro in a test program (attached) and then it was tried to compile on these different accounts.

I attach the listing files too.
But I can not find a difference between these accounts refering the compiling.

For the account srv_test it works, for the account csmprod it fails.

Attached (files.zip)
test_string.h, test_string.cpp

listing files from compiler:
test_csmprod.lis, test_srvtest.lis

Wim Van den Wyngaert
Honored Contributor

Re: C++ Template with string -> Compiler problem


Your include path is different and as a result you pick up the wrong (a different) file in


May be others too.

I would first try in prod with the same /include as in test to see if it this (alone) is the problem. Then check the files in test subdirectory.