Search the web
Sign In
New User? Sign Up
mpatrol · mpatrol library discussion group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
linking mpatrol in mingw   Message List  
Reply | Forward Message #1010 of 1198 |
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








Mon May 22, 2006 9:56 pm

kalzak
Offline Offline
Send Email Send Email

Forward
Message #1010 of 1198 |
Expand Messages Author Sort by Date

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...
kalzak
Offline Send Email
May 22, 2006
9:57 pm

Dear Kalzal Try the following linker option: -Wl,--allow-multiple-definition Works for me Kind regards, John Boers MAPPER Lithography Lorentzweg 1 2628 CJ...
j.boers@...
boers_j
Offline Send Email
May 23, 2006
6:05 am

Thank you for that, John! It compiles perfectly now. Another issue has come up. It is exactly the same one described in post #952 (i.e. where mpatrol aborts...
kalzak
Offline Send Email
May 23, 2006
5:00 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help