[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::c_plus_plus

Title:C++
Notice:Read 1.* and use keywords (e.g. SHOW KEY/FULL KIT_CXX_VAX_VMS)
Moderator:DECCXX::AMARTIN
Created:Fri Nov 06 1987
Last Modified:Thu Jun 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3604
Total number of notes:18242

3435.0. "problem using Stopwatch" by CIM2NI::THORPE () Thu Feb 06 1997 11:30

I'm getting the following compile-time error when using Stopwatch.  I
do not get the error when I create a small program but in my large
program I do which suggests some interference with something else
being included.

There is too much code to post here but can anyone give me some tips
to tracking this down?

Thanks,
Bill

=================================================
Line  16981:           void times (tbuffer_t *__buffer);   /* <sys/times.h> */
%CXX-E-NOLINKAGE, In this declaration, "times" has no linkage and has a prior
        declaration in this scope at line number 62 in file
        SYS$COMMON:[SYSLIB]CXXL$ANSI_DEF.TLB;2.


=================================================
An excerpt from SYS$COMMON:[SYSLIB]CXXL$ANSI_DEF.TLB;2.....

#   if __VMS_VER >= 70000000 && !defined _DECC_V4_SOURCE
       clock_t times(struct tms *buffer);
#   else
       void times (tbuffer_t *__buffer);   /* <sys/times.h> */
#   endif
=================================================

$ cxx/version nl:
DEC C++ V5.4-010 on OpenVMS Alpha V6.1
T.RTitleUserPersonal
Name
DateLines
3435.1might be conflict with times function object in STL header file <functional>DECC::J_WARDThu Feb 06 1997 12:3916
See Note 3152.

An update:

The ANSI C++ standards committee recently
changed the name "times" to "multiplies" so this
will not be a problem in the next standard library
version (V5.6) and beyond. Of course, namespaces
would have eliminated the conflict eventually
anyway.

If this is the problem and you need help working
around the problem let us know. I think a reply
to the note describes our suggested solution.
Basically you use macros to change the name.
3435.2successful workaroundCIMBAD::THORPEThu Feb 06 1997 14:125
Thanks for the fast (and correct as usual) response.

The workaround in 3152 did the trick.

-Bill