Boost logo

Boost Users :

Subject: Re: [Boost-users] [ASIO|Thread] Advice for removing MFC/ afxwin.hdependancies
From: smbrown_at_[hidden]
Date: 2010-05-26 07:26:27


boost-users-bounces_at_[hidden] wrote on 25/05/2010 17:52:09:
> > I can bodge around those errors, but then the code doesn't link as new
and
> > delete have already been referenced from an afx lib.
>
> Could you copy&paste the linker errors?
> Make sure that your MFC and CRT (both in the app and in boost) linkage
> are coherent.
With just two afxwin.h inclusions the linker error is:
nafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator
new(unsigned int)" (??2_at_YAPAXI@Z) already defined in LIBCMTD.lib(new.obj)
nafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator
delete(void *)" (??3_at_YAXPAX@Z) already defined in LIBCMTD.lib(dbgdel.obj)
nafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator
new[](unsigned int)" (??_U_at_YAPAXI@Z) already defined in
libcpmtd.lib(newaop.obj)
nafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator
delete[](void *)" (??_V_at_YAXPAX@Z) already defined in
LIBCMTD.lib(delete2.obj)

I'm using /NODEFAULTLIB:libcmt.lib

Simon

++++ IMPORTANT NOTICE ++++

This email may contain confidential information and will be protected by copyright.
It is intended only for the use of the person(s) to whom it is addressed and any unauthorised use (including forwarding or dissemination the contents) may be unlawful. If you receive this email by mistake, please advise the sender immediately by using the reply facility on your email software and delete the email from your computer.

Opinions, conclusions and other information in this email that do not relate to the official business of this organisation shall be understood as neither given nor endorsed by it.

If this message forms part of a quotation for the supply of goods, the quotation is an invitation to treat only. No contract will come into effect until the Company issuing such quotation issues an acknowledgment of order for the supply of such goods. The contract will be on the terms of such acknowledgment of order.

------------------------------------------------------------------------
Teledyne Defence Limited
 
phone: +44 (0) 1274 531602
 
web: www.teledynedefence.co.uk
------------------------------------------------------------------------


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net