I downloaded the precompiled binaries for mpatrol from mingw.org
and, thanks to prior posts, I tried the following to link the simple
program found in section 16.1 of the manual:
gcc mptest.c -lmpatrol -lbfd -liberty -limagehlp
but got a link error stating that I have multiple definitions of
some of the functions used to allocate memory. Anyone ran into this
problem or can offer suggestions around it?
Thanks,
Kal
gcc: 3.4.5
mpatrol: 1.4.8
Details of the link error:
==========================
/mingw/lib/libmoldname.a(duuds00081.o): multiple definition of
`strdup'
/mingw/lib/libmpatrol.a
(malloc.o):c:/mnt/prj/pkg/src/mpatrol/1.4.8/build/mingw32/../../src/m
alloc.c:208: first defined here
/mingw/lib/libmsvcrt.a(dwpds00634.o): multiple definition of `memset'
/mingw/lib/libmpatrol.a
(malloc.o):c:/mnt/prj/pkg/src/mpatrol/1.4.8/build/mingw32/../../src/m
alloc.c:673: first defined here
/mingw/lib/libmsvcrt.a(dwpds00575.o): multiple definition of `free'
/mingw/lib/libmpatrol.a
(malloc.o):c:/mnt/prj/pkg/src/mpatrol/1.4.8/build/mingw32/../../src/m
alloc.c:472: first defined here
/mingw/lib/libmsvcrt.a(dwpds00545.o): multiple definition of `calloc'
/mingw/lib/libmpatrol.a
(malloc.o):c:/mnt/prj/pkg/src/mpatrol/1.4.8/build/mingw32/../../src/m
alloc.c:82: first defined here
/mingw/lib/libmsvcrt.a(dwpds00630.o): multiple definition of `memchr'
/mingw/lib/libmpatrol.a
(malloc.o):c:/mnt/prj/pkg/src/mpatrol/1.4.8/build/mingw32/../../src/m
alloc.c:826: first defined here
/mingw/lib/libmsvcrt.a(dwpds00626.o): multiple definition of `malloc'
/mingw/lib/libmpatrol.a
(malloc.o):c:/mnt/prj/pkg/src/mpatrol/1.4.8/build/mingw32/../../src/m
alloc.c:56: first defined here
/mingw/lib/libmsvcrt.a(dwpds00648.o): multiple definition of
`realloc'
/mingw/lib/libmpatrol.a
(malloc.o):c:/mnt/prj/pkg/src/mpatrol/1.4.8/build/mingw32/../../src/m
alloc.c:371: first defined here
/mingw/lib/libmsvcrt.a(dwpds00633.o): multiple definition of
`memmove'
/mingw/lib/libmpatrol.a
(malloc.o):c:/mnt/prj/pkg/src/mpatrol/1.4.8/build/mingw32/../../src/m
alloc.c:776: first defined here
collect2: ld returned 1 exit status
make: *** [mptest] Error 1