   Strangest Linker Error EVER.
  I''m not kidding...as far as I can tell, I combine two source files, they compile ok, and link fine!  The next day, I get these linker errors while rebuilding (no modifications on project or files)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(dbgdel.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)Debug/MFC Practice.exe : fatal error LNK1169: one or more multiply defined symbols foundI took the new source file out, added it again, and no problem.... it compiled again... fine.  works great.  Go have a snack, close down the compiler, and when I come back to open up the project and work on it, try to compile, same bloody problem.  Which can be fixed simply by removing the new source file from the project (which I wrote in another project) and then adding it agian...yes, that''s all, and it compiles. I just moved the file out of the folder and moved it back, adding it again.  It can''t be a source code problem considering the file compiles fine the first time it is added.  BTW I tried it on both my computers using VC++.  Same problem.  It''s visual C++ 6.0.  I''m more then alittle confused.  Anyone have a clue what''s going on? =)~Michael Sikora  
  me want to bum everyone    the little ass jumped over the sandwich  ;  Have you tried choosing Clean from the build menu and then rebuilding? It seems to clear up many VC++ ultra-weird errors.  ;  Yep, tried a good fresh clean, I might even try a new project if that''s what it takes...~Michael Sikora  ;  its the incremental link and compile.Thats the problem. Its the default option on the compiler and linker with MFC projects.I used to get it when i do CORBA with Orbacus. It was the incremental options. start with a clean build and use the option /FORCE:multiple in you linker settings. warning though, this will cause error''s with debugging your app  { Stating the obvious never helped any situation !! }  ;  Thanks a lot =)  I didn't add the force option, but I unchecked the link incremental.  It gives me a warning but it works again..  Still I want to know why when I add the files to my project they work until I reload.  I have nothing againist Microsoft, (at a personal level) but sometimes I just want too...Let's not go there.~Michael SikoraEdited by - guardian_light on September 3, 2001 2:44:22 AM  ;  See articles such as Q148652 on MSDNEasiest method I found was to add something likenafxcwd.lib libcmtd.libTo the Object/Libraries module in the general settings of the Link tab (VC++).  I don''t think the above article prescribes that but one of them does.Joe  ;  Read the article, now I understand the problem, and adding the libs to my project solved the problem as well.  Thanks for the help =)~Michael Sikora  ;  try with adding the /FORCE:MULTIPLE option in the project settings ->link option->project options . hope this works.kusuma. ;  AP: why have you revived a thread from almost 2 1/2 years ago? 