Re: Linking problem if optimization is disabled

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Sun, 6 Jul 2003 15:47:34 +0200

On Sunday 06 July 2003 15.28, Henrik Nordstrom wrote:
> If optimization is disabled then Squid does not link proper
>
> comm.o: In function `AcceptFD::AcceptFD(void)':
> /home/henrik/SRC/squid/commit/src/comm.cc(.gnu.linkonce.t._._12Defe
>rredRead+0x2e): undefined reference to `DeferredRead::operator
> delete(void *)' collect2: ld returned 1 exit status

I think I figured this one out.. class CommRead contained cbdata glue,
but the class is not used as a cbdata class.

I removed the cbdata glue (including declarations of operator
new+delete) and not linking is happy.

Robert: Please verify that this is correct. This is mostly magic to me
and I do not understand why the linker would ever require a delete
operator if you never create or delete any objects manually even if
these are declared in the class.

Regards
Henrik
Received on Sun Jul 06 2003 - 07:47:53 MDT

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