link statically to mfc

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
xmueller
Earned a small fee
Earned a small fee
Posts: 13
Joined: Mon May 25, 2009 8:13 pm

link statically to mfc

Post by xmueller » Mon May 25, 2009 8:21 pm

Hello experts,
i can't link wxWidgets statically to MFC.
need mfc linked statically.

by changing link order, i could reduce error to only 1:

wxbase28d.lib(init.obj) : error LNK2005: "void __cdecl operator delete(void *,int,char const *,int)" ([email protected]@Z) already defined in nafxcwd.lib(afxmem.obj)

wxWidgets 2.8.10

all libs build with
multithreaded debug (/MTD)

vs 2009, sp1

any help is welcome. thank you.

xmueller
Earned a small fee
Earned a small fee
Posts: 13
Joined: Mon May 25, 2009 8:13 pm

Post by xmueller » Tue May 26, 2009 10:57 am

correction: VS2008 (visual studio 9)

the link error

nafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void *,int,char const *,int)" ([email protected]@Z) already defined in wxbase28d.lib(init.obj)

confuses me. there is no delete operator defined like claimed
above and in addition no delete operator defined at all
in
base::init.cpp

so no idea, why vs linker is complaining here.
please help.

Post Reply