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...
Want to share photos of your group with the world? Add a group photo to Flickr.

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
Getting mpatrol to work with MinGW / Dev-C++?   Message List  
Reply | Forward Message #879 of 1198 |
Re: Getting mpatrol to work with MinGW / Dev-C++?

--- In mpatrol@yahoogroups.com, "algo_dos" <algo_dos@y...> wrote:
> Hello,

> We are trying to put together a simple "beginner's kit" for a C++
course. You can find
> the requirements and history below, at the end of this message.
>
> My current problem is getting mpatrol to work with Dev-C++, i.e.
MinGW gcc. I have
> tried to build mpatrol several times, but never managed to do it
right. The closest I
> got was when using Greg's GNUmakefile, but I still got a few errors
that I could not
> work around after a few hours at it.
>
> Then I found the (precompiled) mpatrol package on the MinGW
Downloads page; that
> one comes with an installer and everything. Perfect! But now that I
have the libs, I'm
> not being able to link my small test programs to mpatrol.
>
> I've read the mpatrol docs and examples, but they are either quite
Unix-centric, or
> (when Windows-specific) somewhate cryptic to me.


Hi,
that text was posted by "algo_dos" about one year ago and it describes
exactely my situation today:

I installed mingw 3.1.0-1 and mpatrol 1.4.8 and then
I created a "very simple" hello-world-program

===================================
// hello.cpp

#include <stdio.h>
#include <stdlib.h>
int main(){
int *vector; // <--
vector = (int*) calloc(32, sizeof(int)); // <--
vector[1] = 100; // <--
printf("hello world, the value is %d\n", vector[1]);
free(vector);
return 1;
}
===================================

...
and a "very simple" makefile, where I added all libraries,
which are mentioned in the manual and which
I could found in the mpatrol-package:

===================================
#makefile

# warning-flags
WFLAGS = -g -Wall -pedantic
#include-flags
IFLAGS = -include C:/mingw/include/mpatrol.h
#library-flags
LFLAGS = -lm -lmpalloc -lmpatrol -lmpatrolmt -lmptools

hello.exe: hello.o
g++ -o hello.exe hello.o $(LFLAGS) $(WFLAGS)
hello.o: hello.cpp
g++ -c -o hello.o hello.cpp $(IFLAGS) $(WFLAGS)
===================================

This will compile, but if I try to run it, the program crashes and
produces an unknown "software exception"!

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

Dear "algo_dos", maybe you have solved "your problem"
and now have an idea for this problem?

Has anyone a hint for me, what is wrong in the example above?
Have I forgotten a library - have I to keep a special order?

Has the above mentioned "beginner's kit" become reality in the
meantime! Where can I find it?

Thanks for all help in advance
(I'm sure, it must only be a tininess, but an important one...)

Gerhard





Wed Apr 14, 2004 1:50 pm

gph_3d
Offline Offline
Send Email Send Email

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

Hello, We are trying to put together a simple "beginner's kit" for a C++ course. You can find the requirements and history below, at the end of this message. ...
algo_dos
Offline Send Email
Aug 19, 2003
5:52 pm

... course. You can find ... MinGW gcc. I have ... right. The closest I ... that I could not ... Downloads page; that ... have the libs, I'm ... Unix-centric,...
gph_3d
Offline Send Email
Apr 14, 2004
1:50 pm

... [trimmed and reformatteed] ... The customary advice on <mingw-users@...> is to get things working on the command line first. Often that...
Greg Chicares
chicares
Offline Send Email
Apr 15, 2004
12:12 am
Advanced

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