# Problems compiling Paul Nettle's Memory Manager in DevCpp

This topic is 5147 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Im trying to compile Paul Nettle's Memory Manager in DevCPP and i am getting some errors. My whole project compiles on VC++2003 without any errors or warnings. Here are some of the errors. 792 Source\mmgr.cpp new_handler' undeclared (first use this function) 792 Source\mmgr.cpp parse error before =' token Source/mmgr.cpp: In function void doCleanupLogOnFirstRun()': Source/mmgr.cpp:290: unlink' undeclared (first use this function)

##### Share on other sites
That code was written for VC++. If you are going to need this to compile for both VC and gcc (MingW), then you will need to make some changes. For the two errors you listed, try this:

// find this#include <new>// replace it with #if defined(_MSC_VER)#    include <new>#elif defined(__GNUC__)#    include <new.h>#    define unlink _unlink#endif

I foud the solutions by doing 'Find in Files' on new_handler and unlink in the MingW include directory. If anymore compiler-compatibility errors arise, you should be able to do the same to determine how to fix them.

##### Share on other sites
Thx, ill give it a try.

1. 1
2. 2
Rutin
18
3. 3
4. 4
5. 5
frob
13

• 12
• 9
• 31
• 16
• 9
• ### Forum Statistics

• Total Topics
632612
• Total Posts
3007423

×