Operating System - OpenVMS
1828207 Members
2186 Online
109975 Solutions
New Discussion

C++ Template with string -> Compiler problem

 
Martin Krüger
New Member

C++ Template with string -> Compiler problem

Hello,

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 !

greets
Martin
3 REPLIES 3
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
New Member

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

Hi,

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)
--------------------
program:
test_string.h, test_string.cpp

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

greets
Martin
Wim Van den Wyngaert
Honored Contributor

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

Martin,

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

include

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.

Wim
Wim