From: Vipin on
I started my mfc solution today and it started giving the below errors:-

Linking...
uafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator
new(unsigned int)" (??2(a)YAPAXI@Z) already defined in libcpmtd.lib(newop.obj)
uafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void
*)" (??3(a)YAXPAX@Z) already defined in LIBCMTD.lib(dbgdel.obj)
uafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator
new[](unsigned int)" (??_U(a)YAPAXI@Z) already defined in
libcpmtd.lib(newaop.obj)
uafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator
delete[](void *)" (??_V(a)YAXPAX@Z) already defined in
LIBCMTD.lib(delete2.obj)

I have static MFC library and static CRT, so I am wondering where the
problem is. Just wondering if something got corrupted.

Any clues?

Thanks
Vipin


From: Gert on
Vipin wrote:
> I started my mfc solution today and it started giving the below errors:-
>

These kind of errors are normally caused by
- mixing debug and release objects
- mixing single threaded and multithreaded objects
- mixing statically linked and dynamically linked libraries.
(objects as in compiled files).

Verify the settings of all your projects inside the solution/workspace
and do a full rebuild.

Gert
From: Vipin on
yes, I did all the below before posting here. I will recheck the first point
by deleting the objs manually.

Thanks
Vipin

"Gert" <onlyReplyInNewsgroups(a)please.com> wrote in message
news:432a4503$0$11016$ba620dc5(a)text.nova.planet.nl...
> Vipin wrote:
>> I started my mfc solution today and it started giving the below errors:-
>>
>
> These kind of errors are normally caused by
> - mixing debug and release objects
> - mixing single threaded and multithreaded objects
> - mixing statically linked and dynamically linked libraries.
> (objects as in compiled files).
>
> Verify the settings of all your projects inside the solution/workspace and
> do a full rebuild.
>
> Gert


From: Vipin on
Well I tried it but it gives me the same error.
I looked at afmem.c file in MFC and it has new and delete operators defined
there.

I also have a static library which links to static CRT library using /MT.

I am wondering how there will be resolution between CRT new/delete and the
one defined in MFC during linking.

One thing I don't understand is the same thing was working quite well
yesterday, I am wondering my shutdown which was not the best way had caused
some harm to solution files.

Thanks
Vipin



"Gert" <onlyReplyInNewsgroups(a)please.com> wrote in message
news:432a4503$0$11016$ba620dc5(a)text.nova.planet.nl...
> Vipin wrote:
>> I started my mfc solution today and it started giving the below errors:-
>>
>
> These kind of errors are normally caused by
> - mixing debug and release objects
> - mixing single threaded and multithreaded objects
> - mixing statically linked and dynamically linked libraries.
> (objects as in compiled files).
>
> Verify the settings of all your projects inside the solution/workspace and
> do a full rebuild.
>
> Gert


From: Vipin on
I will use /FORCE:multiple for time being.
Buf if there is some other way, let me know.

Thanks
Vipin

"Vipin" <Vipin(a)nospam.com> wrote in message
news:eRSkKXtuFHA.3124(a)TK2MSFTNGP10.phx.gbl...
> Well I tried it but it gives me the same error.
> I looked at afmem.c file in MFC and it has new and delete operators
> defined there.
>
> I also have a static library which links to static CRT library using /MT.
>
> I am wondering how there will be resolution between CRT new/delete and the
> one defined in MFC during linking.
>
> One thing I don't understand is the same thing was working quite well
> yesterday, I am wondering my shutdown which was not the best way had
> caused some harm to solution files.
>
> Thanks
> Vipin
>
>
>
> "Gert" <onlyReplyInNewsgroups(a)please.com> wrote in message
> news:432a4503$0$11016$ba620dc5(a)text.nova.planet.nl...
>> Vipin wrote:
>>> I started my mfc solution today and it started giving the below
>>> errors:-
>>>
>>
>> These kind of errors are normally caused by
>> - mixing debug and release objects
>> - mixing single threaded and multithreaded objects
>> - mixing statically linked and dynamically linked libraries.
>> (objects as in compiled files).
>>
>> Verify the settings of all your projects inside the solution/workspace
>> and do a full rebuild.
>>
>> Gert
>
>