Including <vector> in VC6 project - compile errors
- From: cmiddlebrook@xxxxxxxxxxxxxx
- Date: 8 Mar 2006 04:04:10 -0800
Hi there,
I have a VC6 project to which I would like to use the std::vector
class. When I include it i get a bunch of compile errors which are
highlighted in the <new> header. These are as follows:
--------------------Configuration: vc_rars - Win32
Debug--------------------
Compiling...
drivers.cpp
c:\program files\microsoft visual studio\vc98\include\new(35) : error
C2059: syntax error : 'string'
c:\program files\microsoft visual studio\vc98\include\new(35) : error
C2091: function returns function
c:\program files\microsoft visual studio\vc98\include\new(35) : error
C2809: 'operator new' has no formal parameters
c:\program files\microsoft visual studio\vc98\include\new(36) : error
C2059: syntax error : 'string'
c:\program files\microsoft visual studio\vc98\include\new(37) : error
C2091: function returns function
c:\program files\microsoft visual studio\vc98\include\new(37) : error
C2556: 'void *(__cdecl *__cdecl operator new(void))(unsigned int,const
struct std::nothrow_t &)' : overloaded function differs only by return
type from 'void *(__cdecl *__cdecl op
erator new(void))(unsigned int)'
c:\program files\microsoft visual studio\vc98\include\new(35) :
see declaration of 'new'
c:\program files\microsoft visual studio\vc98\include\new(41) : error
C2059: syntax error : 'string'
c:\program files\microsoft visual studio\vc98\include\new(42) : error
C2091: function returns function
c:\program files\microsoft visual studio\vc98\include\new(42) : error
C2556: 'void *(__cdecl *__cdecl operator new(void))(unsigned int,void
*)' : overloaded function differs only by return type from 'void
*(__cdecl *__cdecl operator new(void))(unsig
ned int)'
c:\program files\microsoft visual studio\vc98\include\new(35) :
see declaration of 'new'
c:\program files\microsoft visual studio\vc98\include\new(42) : error
C2809: 'operator new' has no formal parameters
c:\program files\microsoft visual studio\vc98\include\new(42) : error
C2065: '_P' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\memory(16) :
error C2059: syntax error : 'string'
c:\program files\microsoft visual studio\vc98\include\memory(17) :
error C2091: function returns function
c:\program files\microsoft visual studio\vc98\include\memory(17) :
error C2784: 'void *(__cdecl *__cdecl operator new(void))(unsigned
int,class std::allocator<`template-parameter257'> &)' : could not
deduce template argument for 'void *(__cdecl *)(u
nsigned int,class std::allocator<_Ty> &)' from 'void *(__cdecl
*)(unsigned int)'
c:\program files\microsoft visual studio\vc98\include\memory(17) :
error C2785: 'void *(__cdecl *__cdecl operator new(void))(unsigned
int,class std::allocator<`template-parameter257'> &)' and 'void
*(__cdecl *__cdecl operator new(void))(unsigned int
)' have different return types
c:\program files\microsoft visual
studio\vc98\include\memory(16) : see declaration of 'new'
c:\program files\microsoft visual studio\vc98\include\memory(17) :
error C2809: 'operator new' has no formal parameters
c:\program files\microsoft visual studio\vc98\include\memory(20) :
error C2954: template definitions cannot nest
d:\source\rars\rars\list.h(106) : warning C4284: return type for
'List<class GA_Driver *>::iterator::operator ->' is 'class GA_Driver **
' (ie; not a UDT or reference to a UDT. Will produce errors if applied
using infix notation)
d:\source\rars\rars\ga_driver_pop.h(41) : see reference to
class template instantiation 'List<class GA_Driver *>' being compiled
d:\source\rars\rars\list.h(107) : warning C4284: return type for
'List<class GA_Driver *>::iterator::operator ->' is 'class GA_Driver
*const * ' (ie; not a UDT or reference to a UDT. Will produce errors
if applied using infix notation)
d:\source\rars\rars\ga_driver_pop.h(41) : see reference to
class template instantiation 'List<class GA_Driver *>' being compiled
race_manager.cpp
c:\program files\microsoft visual studio\vc98\include\new(35) : error
C2059: syntax error : 'string'
c:\program files\microsoft visual studio\vc98\include\new(35) : error
C2091: function returns function
c:\program files\microsoft visual studio\vc98\include\new(35) : error
C2809: 'operator new' has no formal parameters
c:\program files\microsoft visual studio\vc98\include\new(36) : error
C2059: syntax error : 'string'
c:\program files\microsoft visual studio\vc98\include\new(37) : error
C2091: function returns function
c:\program files\microsoft visual studio\vc98\include\new(37) : error
C2556: 'void *(__cdecl *__cdecl operator new(void))(unsigned int,const
struct std::nothrow_t &)' : overloaded function differs only by return
type from 'void *(__cdecl *__cdecl op
erator new(void))(unsigned int)'
c:\program files\microsoft visual studio\vc98\include\new(35) :
see declaration of 'new'
c:\program files\microsoft visual studio\vc98\include\new(41) : error
C2059: syntax error : 'string'
c:\program files\microsoft visual studio\vc98\include\new(42) : error
C2091: function returns function
c:\program files\microsoft visual studio\vc98\include\new(42) : error
C2556: 'void *(__cdecl *__cdecl operator new(void))(unsigned int,void
*)' : overloaded function differs only by return type from 'void
*(__cdecl *__cdecl operator new(void))(unsig
ned int)'
c:\program files\microsoft visual studio\vc98\include\new(35) :
see declaration of 'new'
c:\program files\microsoft visual studio\vc98\include\new(42) : error
C2809: 'operator new' has no formal parameters
c:\program files\microsoft visual studio\vc98\include\new(42) : error
C2065: '_P' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\memory(16) :
error C2059: syntax error : 'string'
c:\program files\microsoft visual studio\vc98\include\memory(17) :
error C2091: function returns function
c:\program files\microsoft visual studio\vc98\include\memory(17) :
error C2784: 'void *(__cdecl *__cdecl operator new(void))(unsigned
int,class std::allocator<`template-parameter257'> &)' : could not
deduce template argument for 'void *(__cdecl *)(u
nsigned int,class std::allocator<_Ty> &)' from 'void *(__cdecl
*)(unsigned int)'
c:\program files\microsoft visual studio\vc98\include\memory(17) :
error C2785: 'void *(__cdecl *__cdecl operator new(void))(unsigned
int,class std::allocator<`template-parameter257'> &)' and 'void
*(__cdecl *__cdecl operator new(void))(unsigned int
)' have different return types
c:\program files\microsoft visual
studio\vc98\include\memory(16) : see declaration of 'new'
c:\program files\microsoft visual studio\vc98\include\memory(17) :
error C2809: 'operator new' has no formal parameters
c:\program files\microsoft visual studio\vc98\include\memory(20) :
error C2954: template definitions cannot nest
d:\source\rars\rars\list.h(106) : warning C4284: return type for
'List<class GA_Driver *>::iterator::operator ->' is 'class GA_Driver **
' (ie; not a UDT or reference to a UDT. Will produce errors if applied
using infix notation)
d:\source\rars\rars\ga_driver_pop.h(41) : see reference to
class template instantiation 'List<class GA_Driver *>' being compiled
d:\source\rars\rars\list.h(107) : warning C4284: return type for
'List<class GA_Driver *>::iterator::operator ->' is 'class GA_Driver
*const * ' (ie; not a UDT or reference to a UDT. Will produce errors
if applied using infix notation)
d:\source\rars\rars\ga_driver_pop.h(41) : see reference to
class template instantiation 'List<class GA_Driver *>' being compiled
ga_driver_pop.cpp
d:\source\rars\rars\list.h(106) : warning C4284: return type for
'List<class GA_Driver *>::iterator::operator ->' is 'class GA_Driver **
' (ie; not a UDT or reference to a UDT. Will produce errors if applied
using infix notation)
d:\source\rars\rars\ga_driver_pop.h(41) : see reference to
class template instantiation 'List<class GA_Driver *>' being compiled
d:\source\rars\rars\list.h(107) : warning C4284: return type for
'List<class GA_Driver *>::iterator::operator ->' is 'class GA_Driver
*const * ' (ie; not a UDT or reference to a UDT. Will produce errors
if applied using infix notation)
d:\source\rars\rars\ga_driver_pop.h(41) : see reference to
class template instantiation 'List<class GA_Driver *>' being compiled
Error executing cl.exe.
Creating browse info file...
vc6_rars.exe - 34 error(s), 6 warning(s)
Any ideas?
Thanks,
Caroline
.
- Follow-Ups:
- Re: Including <vector> in VC6 project - compile errors
- From: Arnaud Debaene
- Re: Including <vector> in VC6 project - compile errors
- From: Stephen Howe
- Re: Including <vector> in VC6 project - compile errors
- Prev by Date: Re: Anyone know how to use the "Safe Standard C++ Library"?
- Next by Date: Re: Including <vector> in VC6 project - compile errors
- Previous by thread: Re: Smart pointer: const wrapped object pointer?
- Next by thread: Re: Including <vector> in VC6 project - compile errors
- Index(es):
Relevant Pages
|