Hello,
I'm trying to debug my program with mpatrol, but I get this error when I try to link:
D:\mpatrol\1.4.8-mingw\build\mingw32\libmpatrol.a(cplus.o)(.text+0x440) In function `ZdlPv':
238 D:\mpatrol\1.4.8-mingw\src\cplus.c multiple definition of `operator delete(void*)'
/Dev-Cpp5/wxWindows-2.4.2/include/wx/msw/font.h D:\Dev-Cpp5\wxWindows-2.4.2\samples\minimal\minimal.o(.text$_ZdlPv+0x0):D first defined here
new_handler.cc D:\MinGW333\lib\libstdc++.a(new_handler.o)(.text+0x0) multiple definition of `std::set_new_handler(void (*)())'
74 D:\mpatrol\1.4.8-mingw\build\mingw32\libmpatrol.a(cplus.o)(.text+0x0):D:\mpatrol\1.4.8-mingw\src\cplus.c first defined here
This only happens when I am working with wxWidgets. If I compile a simple console "Hello world" program, then it works.
Any idea?
linking with mpatrol
- Ryan Norton
- wxWorld Domination!
- Posts: 1319
- Joined: Mon Aug 30, 2004 6:01 pm
Re: linking with mpatrol
Sure - wx provides it's own memory tracing routines.asp wrote:Hello,
I'm trying to debug my program with mpatrol, but I get this error when I try to link:
D:\mpatrol\1.4.8-mingw\build\mingw32\libmpatrol.a(cplus.o)(.text+0x440) In function `ZdlPv':
238 D:\mpatrol\1.4.8-mingw\src\cplus.c multiple definition of `operator delete(void*)'
/Dev-Cpp5/wxWindows-2.4.2/include/wx/msw/font.h D:\Dev-Cpp5\wxWindows-2.4.2\samples\minimal\minimal.o(.text$_ZdlPv+0x0):D first defined here
new_handler.cc D:\MinGW333\lib\libstdc++.a(new_handler.o)(.text+0x0) multiple definition of `std::set_new_handler(void (*)())'
74 D:\mpatrol\1.4.8-mingw\build\mingw32\libmpatrol.a(cplus.o)(.text+0x0):D:\mpatrol\1.4.8-mingw\src\cplus.c first defined here
This only happens when I am working with wxWidgets. If I compile a simple console "Hello world" program, then it works.
Any idea?
If you don't want those and want to use mpatrol instead, set
wxUSE_GLOBAL_MEMORY_OPERATORS to 0 when compiling wxWidgets.
(It _should_ work - in general it's probably a better idea to stick with wxWidget's version - see wx/memory.h for more info).
[Mostly retired moderator, still check in to clean up some stuff]