Problems compiling Paul Nettle's Memory Manager in DevCpp

Started by
1 comment, last by GamerSg 19 years, 8 months ago
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)
Advertisement
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.
Thx, ill give it a try.

This topic is closed to new replies.

Advertisement