Re: MSVC C++ problems

From: Robert Collins <robertc@dont-contact.us>
Date: 19 Jul 2003 20:49:32 +1000

On Sat, 2003-07-19 at 20:34, Serassio Guido wrote:
> Hi Robert,
>
> At 13.01 16/07/2003, Robert Collins wrote:
>
> > > This seems to be the biggest left problem :
> >
> >Here, Id is a embedded class of DelayVector. Can you try changing
> >DelayVector::Pointer on line 69 to RefCount<DelayVector> ?
>
> Making this change in delayvector.h, delaytagged.h and delayuser.h all the
> unexpected 'class' errors are gone, this is the compile result:
>
> delay_pools.cc
> c:\work\nt-3.0\src\delayvector.h(76) : error C2027: use of undefined type
> 'DelayVector'
> c:\work\nt-3.0\src\delayvector.h(41) : see declaration of
> 'DelayVector'

can you change this likewise - RefCount<DelayVector> ?

> It seems to compile fine, but at link time:
>
> Linking...
> test_tools.obj : error LNK2005: "void * __cdecl operator new(unsigned int)"
> (??2@YAPAXI@Z) already defined in VirtualDeleteOperator.obj
> test_tools.obj : error LNK2005: "void __cdecl operator delete(void *)"
> (??3@YAXPAX@Z) already defined in VirtualDeleteOperator.obj
> test_tools.obj : error LNK2005: "void * __cdecl operator new[](unsigned
> int)" (??_U@YAPAXI@Z) already defined in VirtualDeleteOperator.obj
> test_tools.obj : error LNK2005: "void __cdecl operator delete[](void *)"
> (??_V@YAXPAX@Z) already defined in VirtualDeleteOperator.obj
> Debug/VirtualDeleteOperator.exe : fatal error LNK1169: one or more multiply
> defined symbols found

You should be able to get MSVC to demangle those operators. They look
like they might be the global operator new and delete operators.

If so, they are meant to be in test_tools, not in
VirtualDeleteOperator.obj.

be sure you aren't defining _SQUID_EXTERNNEW_ in
VirtualDeleteOperator.obj.

Oh, and Array.cc shouldn't be compiled anymore - its not needed.

Cheers,
Rob

-- 
GPG key available at: <http://members.aardvark.net.au/lifeless/keys.txt>.

Received on Sat Jul 19 2003 - 04:49:42 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:20:17 MST