1753485 Members
4370 Online
108794 Solutions
New Discussion

Re: compilation error

 
YE LIU_1
Frequent Advisor

Re: compilation error

Hi, Hoff

It works means it compiles and yes I cut and pasted the head files from my project to the example C++ programs provided by VMS. I need define _DECC_V4_SOURCE in order to use multinet and I still have the same problem.

YE LIU
Hoff
Honored Contributor

Re: compilation error

Seems you're left with a choice: upgrade the C++ code to a more current instantiation of the compiler, or rework the C++ code for source compatibility with the V4 compiler instantiation (these being the two overt resolutions of the "don't lie to the C++ compiler" maxim) or split the compilation into multiple modules.

As a general rule, staying on old versions of software or hardware isn't a viable long-term strategy. It works for a while, though you eventually do get to pay to upgrade or to port or to fix the issues that inevitably crop up. And in any case, these messes and these choices tend to get punted up to management for a decision.

As (another) general rule, it's been my experience that these cases can sometimes be the result of some simple error that somebody used the compatibility setting to paper over; it might well be feasible to move forward by fixing a few bugs that more recent compilers have noticed. That the use of the old compatibility can be a legacy of a long-forgotten quick fix. I've also worked various cases where the compiler knobs were inexplicably set to suppress actual and real source code errors; the continued use of /STANDARD=VAXC being a salient example of this with the C compiler.

The best choice here depends on the project goals and budget and timeframe.