🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.tools.mfc
Article #31

LNK2005 error

#31
From: Mike Martonfi
Date: Fri, 19 Jan 1996 21:45
31 lines
1870 bytes
I just started using VC4.0 on a project that was built using 
VC2.2. Upon linking, I get the following errors:
---------------------
nafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl 
operator new(unsigned int)"(??2@YAPAXI@Z) already defined in 
LIBCMTD.lib(new.obj)
nafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator 
delete(void *)"(??3@YAXPAX@Z) already defined in 
LIBCMTD.lib(dbgnew.obj)
nafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl 
operator new(unsigned int,int,char const 
*,int)"(??2@YAPAXIHPBDH@Z) already defined in 
LIBCMTD.lib(dbgnew.obj)
WinDebug/abel.exe : fatal error LNK1169: one or more multiply 
defined symbols found
---------------------

All the documentation I have read on LNK2005 errors say that the 
most probable cause is accidentally linking with both the 
single-threaded and multithreaded libraries. I have checked my 
run-time libraries for all of my objects and they all use "Debug 
Multithreaded".  I only link in 2 libs:
gui4.lib (which is a lib we created using VC4.0) and vfw32.lib. 
I have checked the run-time libraries for all objects in 
GUI4.lib and they all use "Debug Multithreaded" as well. 

Anybody know what's going on? I have already wasted too much 
time on this problem. Any help would be more than greatly 
appreciated.

Thanks.
Technical Details
Message-ID: <310010EC.17C8@abelcomputers.com>
Path: arc1-ca.pugleaf.net!noc.tor.hookup.net!news

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!noc.tor.hookup.net!news
From: Mike Martonfi <mikem@abelcomputers.com>
Newsgroups: comp.os.ms-windows.programmer.tools.mfc;,comp.os.ms-windows.programmer.win32;,comp.lang.c++
Subject: LNK2005 error
Date: Fri, 19 Jan 1996 16:45:16 -0500
Organization: ABEL Computers
Message-ID: <310010EC.17C8@abelcomputers.com>
NNTP-Posting-Host: mikem.abelcomputers.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 2.0b4 (WinNT; I)
CC: joemas@microsoft.com