Including Ogre into raknet...

Problems building or running the engine, queries about how to use features etc.
User avatar
c_olin
Kobold
Posts: 25
Joined: Sun Jan 02, 2005 2:25 am

Including Ogre into raknet...

Post by c_olin »

just for good measure, I thought it would be a good idea to change every printf() in Raknet's code into LogManager::getSingleton().logMessage()

For easier error reading and to unify aeverything.

So, I add:

Code: Select all

#include "Ogre.h"
#include "OgreNoMemoryMacros.h"
Into SocketLayer.h and it compiled fine, and ran fine, but when i exited I would get some strange exeption involving memory.

Any ideas?
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67

Post by sinbad »

LogManager would have to be constructed and a Log created before RakNet did any logging.

I don't think it's really a good idea to replace all of RakNet's logging though, event though printf is a bit of a blunt instrument. You can redirect the output to a file by calling:

Code: Select all

   freopen( "RakNet.log", "w", stdout );
See http://www.cplusplus.com/ref/cstdio/freopen.html .