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...
Message search is now enhanced, find messages faster. Take it for a spin.

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
mpatrol and mingw (was: Getting mpatrol to work with MinGW / Dev-C+   Message List  
Reply | Forward Message #881 of 1198 |













Hi Greg,
you wrote:

> Cutting and pasting your code, I do this

> C:/tmp[3]$/MinGW/bin/g++ -c -ggdb hello.cpp
> C:/tmp[0]$/MinGW/bin/g++ -o hello.exe hello.o -L/local/lib -lmpatrol
-lbfd -liberty -limagehlp
> C:/tmp[0]$./hello
> C:/tmp[0]$ls -l mpatrol.log

> so something worked.

Bingo, that worked!

But why "-lbfd -liberty -limagehlp"?
I searched the mpatrol-manual for this phrases and get
some hints in the form:
"if the mpatrol library was built ... then link with...",
but that really doesn't help me, because - as you know:
I used the binaries.

>> #library-flags
>> LFLAGS = -lm -lmpalloc -lmpatrol -lmpatrolmt -lmptools

> Looks like you're linking non-threaded and threaded
> mpatrol libraries. And doesn't '-lmpalloc' defeat the
> whole purpose?

I'm no expert on this area, I just linked all libraries, which
I found in the mpatrol-package... Obviously that was wrong.

-------------------------------------------

>> (Of course, without the mpatrol-stuff it works fine.)

> Exactly what mpatrol-stuff do you omit? The header and
> the libraries both? What happens if you try the method I
> used above?

I omitted both: the "- include mpatrol.h" _and_ all four libraries
mentioned above. With "your method", the program runs perfectly!

------------------------------------------------------------------

> I suspect that the gcc C++ ABI has changed since
> the downloaded library was built. That would
> explain mysterious behavior if true. Try building
> the library from source.

Originally I started with compiling mpatrol from the source.
My try was:

to edit the \built\windows\makefile:
AR = ar
LD = $(CC)

CFLAGS = -I$(SOURCE) -I$(TOOLS) # removing -nolog
OFLAGS = # removing -Ogt

The compiler starts compiling some files, but then it stops when compiling
"inter.c":
../../src/inter.c: In function `void* __mp_alloc(unsigned int, unsigned
int,
alloctype, char*, char*, long unsigned int, char*, unsigned int,
unsigned
int)':
../../src/inter.c:863: `sbrk' undeclared (first use this function)
../../src/inter.c:863: (Each undeclared identifier is reported only once
for
each function it appears in.)
mingw32-make.exe: *** [inter.obj] Error 1
------------------------------------------------------------

So I was very happy, when I found the binaries at mingw.org\download.shtml!
But thanks for your advice anyway.

I think I should start learning more about "-lbfd -liberty -limagehlp".

Thanks a lot for your answer. You made me happy.

Gerhard








Thu Apr 15, 2004 3:46 pm

gph_3d
Offline Offline
Send Email Send Email

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

Hi Greg, ... -lbfd -liberty -limagehlp ... Bingo, that worked! But why "-lbfd -liberty -limagehlp"? I searched the mpatrol-manual for this phrases and get ...
Gerhard Herbig
gph_3d
Offline Send Email
Apr 15, 2004
3:47 pm
Advanced

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