[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

3534.0. "C++ compilation errors" by IOSG::HARDIE () Thu Apr 10 1997 09:27

	During some porting work from Windows NT to OpenVMS, I've come
	across some sort of compilation clash between the <time.h> and
	<list> header files.

	The following program (a.cxx) demonstrates the problem.

	#include <time.h>
	#include <list>

	main(void)
	{
	}

	I've tried compiling this program with the command cxx/assume=nohead
	and get the following error.

	template <class T>
        ^
%CXX-E-NOLINKAGE, In this declaration, "times" has no linkage and has a prior
 declaration in this scope at line 438 in TIME.
                At line number 62 in FUNCTIONAL.

        }
%VCG-I-NOBJECT, No object file produced.
                At line number 6 in USER1:[HARDIE.SOURCES]A.CXX;1.

%VCG-I-SUMMARY, Completed with 1 error(s), 0 warning(s), and
                1 informational messages.
                At line number 6 in USER1:[HARDIE.SOURCES]A.CXX;1.

	If the program is changed to:

	#include <list>
	#include <time.h>

	main(void)
	{
	}

	then the error is:

               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 62 in FUNCTIONAL.
                At line number 438 in TIME.

        }
%VCG-I-NOBJECT, No object file produced.
                At line number 6 in USER1:[HARDIE.SOURCES]A.CXX;2.

%VCG-I-SUMMARY, Completed with 1 error(s), 0 warning(s), and
                1 informational messages.
                At line number 6 in USER1:[HARDIE.SOURCES]A.CXX;2.

	The C++ version is DEC C++ V5.4-010 on OpenVMS VAX V6.2. 

	On Windows NT these compile fine.  I can't see why the above
	programs should produce these errors and what I can do to fix it.

	Any ideas.

	Thanks,

	Neil
	----
T.RTitleUserPersonal
Name
DateLines
3534.1re: conflict with "times"DECC::J_WARDThu Apr 10 1997 10:062
See notes 3435 and 3152.
3534.2ThanksIOSG::HARDIEFri Apr 11 1997 12:366
    Worked a treat.
    
    Thanks,
    
    Neil
    ----