Jump to content
  • Advertisement
Sign in to follow this  

Problems compiling Paul Nettle's Memory Manager in DevCpp

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

If you intended to correct an error in the post then please contact us.

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 this post

Link to post
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

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 this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!