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 |
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.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
3435.1 | might be conflict with times function object in STL header file <functional> | DECC::J_WARD | Thu Feb 06 1997 09:39 | 16 | |
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.2 | successful workaround | CIMBAD::THORPE | Thu Feb 06 1997 11:12 | 5 | |
Thanks for the fast (and correct as usual) response. The workaround in 3152 did the trick. -Bill |