Trying to get Fluid Studios Memory Manager to compile*solved*

Started by
3 comments, last by utilae 18 years, 8 months ago
Hi, I am using C++ and I am using Visual Studio .NET 2003. I am trying to get that Fluid Studios Memory Manager to compile into my project. It's from this site: http://www.fluidstudios.com/pub/FluidStudios/MemoryManagers/Fluid_Studios_Memory_Manager.zip I'm trying to get it to compile, but I get these errors:
Quote: d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(392) : error C2544: expected ')' for operator '()' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(392) : error C2146: syntax error : missing ';' before identifier 'm_setOwner' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(392) : error C2059: syntax error : 'string' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(392) : error C2059: syntax error : 'constant' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(392) : warning C4183: 'm_setOwner': missing return type; assumed to be a member function returning 'int' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(392) : error C2059: syntax error : '?' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(392) : error C2334: unexpected token(s) preceding ':'; skipping apparent function body d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(392) : error C2760: syntax error : expected '{' not ';' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(393) : error C2144: syntax error : 'void' should be preceded by '}' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(393) : error C2544: expected ')' for operator '()' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(393) : error C2146: syntax error : missing ';' before identifier 'm_setOwner' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(393) : error C2086: 'void *_D3DXMATRIXA16::()' : redefinition d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(392) : see declaration of '_D3DXMATRIXA16::operator`()'' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(393) : error C2059: syntax error : 'string' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(393) : error C2535: 'int _D3DXMATRIXA16::m_setOwner(void)' : member function already defined or declared d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(392) : see declaration of '_D3DXMATRIXA16::m_setOwner' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(393) : error C2059: syntax error : 'constant' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(393) : warning C4183: 'm_setOwner': missing return type; assumed to be a member function returning 'int' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(393) : error C2059: syntax error : '?' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(393) : error C2334: unexpected token(s) preceding ':'; skipping apparent function body d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(393) : error C2760: syntax error : expected '{' not ';' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(396) : error C2144: syntax error : 'void' should be preceded by '}' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(396) : error C2544: expected ')' for operator '()' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(396) : error C2146: syntax error : missing ';' before identifier 'm_setOwner' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(396) : error C2182: '()' : illegal use of type 'void' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(396) : error C2040: '_D3DXMATRIXA16::operator`()'' : 'int' differs in levels of indirection from 'void *' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(396) : error C2059: syntax error : 'string' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(396) : error C2535: 'int _D3DXMATRIXA16::m_setOwner(void)' : member function already defined or declared d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(392) : see declaration of '_D3DXMATRIXA16::m_setOwner' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(396) : error C2059: syntax error : 'constant' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(396) : warning C4183: 'm_setOwner': missing return type; assumed to be a member function returning 'int' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(396) : error C2059: syntax error : '?' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(396) : error C2334: unexpected token(s) preceding ':'; skipping apparent function body d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(396) : error C2760: syntax error : expected '{' not ';' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(397) : error C2144: syntax error : 'void' should be preceded by '}' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(397) : error C2544: expected ')' for operator '()' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(397) : error C2146: syntax error : missing ';' before identifier 'm_setOwner' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(397) : error C2182: '()' : illegal use of type 'void' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(397) : error C2040: '_D3DXMATRIXA16::operator`()'' : 'int' differs in levels of indirection from 'void *' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(397) : error C2059: syntax error : 'string' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(397) : error C2535: 'int _D3DXMATRIXA16::m_setOwner(void)' : member function already defined or declared d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(392) : see declaration of '_D3DXMATRIXA16::m_setOwner' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(397) : error C2059: syntax error : 'constant' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(397) : warning C4183: 'm_setOwner': missing return type; assumed to be a member function returning 'int' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(397) : error C2059: syntax error : '?' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(397) : error C2334: unexpected token(s) preceding ':'; skipping apparent function body d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(397) : error C2760: syntax error : expected '{' not ';' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(400) : error C2146: syntax error : missing '}' before identifier '_D3DXMATRIXA16' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(400) : error C2143: syntax error : missing ';' before '&' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(400) : error C2461: '_D3DXMATRIXA16' : constructor syntax missing formal parameters d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.h(400) : error C2501: '_D3DXMATRIXA16::operator`='' : missing storage-class or type specifiers d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(987) : error C2544: expected ')' for operator '()' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(987) : error C2146: syntax error : missing ';' before identifier 'm_setOwner' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(987) : error C2433: '_D3DXMATRIXA16::operator`()'' : '__forceinline' not permitted on data declarations d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(987) : error C2350: '_D3DXMATRIXA16::operator`()'' is not a static member d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(987) : error C2457: '__FUNCTION__': predefined macro cannot appear outside of a function body d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(987) : error C2501: 'm_setOwner' : missing storage-class or type specifiers d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(987) : error C2365: 'm_setOwner' : redefinition; previous definition was a 'function' d:\Chris\Programming\My Visual Studio Projects\RTS Project\mmgr.h(95) : see declaration of 'm_setOwner' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(987) : error C2078: too many initializers d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(987) : error C2440: 'initializing' : cannot convert from 'const char [1]' to 'int' This conversion requires a reinterpret_cast, a C-style cast or function-style cast d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(987) : error C2059: syntax error : 'constant' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(987) : error C2059: syntax error : ')' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(987) : error C2059: syntax error : 'new' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(988) : error C2143: syntax error : missing ';' before '{' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(988) : error C2447: '{' : missing function header (old-style formal list?) d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1000) : error C2544: expected ')' for operator '()' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1000) : error C2146: syntax error : missing ';' before identifier 'm_setOwner' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1000) : error C2433: '_D3DXMATRIXA16::operator`()'' : '__forceinline' not permitted on data declarations d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1000) : error C2350: '_D3DXMATRIXA16::operator`()'' is not a static member d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1000) : error C2457: '__FUNCTION__': predefined macro cannot appear outside of a function body d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1000) : error C2501: 'm_setOwner' : missing storage-class or type specifiers d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1000) : error C2365: 'm_setOwner' : redefinition; previous definition was a 'function' d:\Chris\Programming\My Visual Studio Projects\RTS Project\mmgr.h(95) : see declaration of 'm_setOwner' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1000) : error C2078: too many initializers d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1000) : error C2440: 'initializing' : cannot convert from 'const char [1]' to 'int' This conversion requires a reinterpret_cast, a C-style cast or function-style cast d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1000) : error C2059: syntax error : 'constant' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1000) : error C2059: syntax error : ')' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1000) : error C2059: syntax error : 'new' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1001) : error C2143: syntax error : missing ';' before '{' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1001) : error C2447: '{' : missing function header (old-style formal list?) d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1013) : error C2544: expected ')' for operator '()' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1013) : error C2146: syntax error : missing ';' before identifier 'm_setOwner' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1013) : error C2182: '()' : illegal use of type 'void' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1013) : error C2433: '_D3DXMATRIXA16::operator`()'' : '__forceinline' not permitted on data declarations d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1013) : error C2350: '_D3DXMATRIXA16::operator`()'' is not a static member d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1013) : error C2457: '__FUNCTION__': predefined macro cannot appear outside of a function body d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1013) : error C2501: 'm_setOwner' : missing storage-class or type specifiers d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1013) : error C2365: 'm_setOwner' : redefinition; previous definition was a 'function' d:\Chris\Programming\My Visual Studio Projects\RTS Project\mmgr.h(95) : see declaration of 'm_setOwner' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1013) : error C2078: too many initializers d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1013) : error C2440: 'initializing' : cannot convert from 'const char [1]' to 'int' This conversion requires a reinterpret_cast, a C-style cast or function-style cast d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1013) : error C2059: syntax error : 'constant' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1013) : error C2059: syntax error : ')' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1013) : error C2059: syntax error : 'delete' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1014) : error C2143: syntax error : missing ';' before '{' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1014) : error C2447: '{' : missing function header (old-style formal list?) d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1024) : error C2544: expected ')' for operator '()' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1024) : error C2146: syntax error : missing ';' before identifier 'm_setOwner' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1024) : error C2182: '()' : illegal use of type 'void' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1024) : error C2433: '_D3DXMATRIXA16::operator`()'' : '__forceinline' not permitted on data declarations d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1024) : error C2350: '_D3DXMATRIXA16::operator`()'' is not a static member d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1024) : error C2457: '__FUNCTION__': predefined macro cannot appear outside of a function body d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1024) : error C2501: 'm_setOwner' : missing storage-class or type specifiers d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1024) : error C2365: 'm_setOwner' : redefinition; previous definition was a 'function' d:\Chris\Programming\My Visual Studio Projects\RTS Project\mmgr.h(95) : see declaration of 'm_setOwner' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1024) : error C2078: too many initializers d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1024) : error C2440: 'initializing' : cannot convert from 'const char [1]' to 'int' This conversion requires a reinterpret_cast, a C-style cast or function-style cast d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1024) : error C2059: syntax error : 'constant' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1024) : error C2059: syntax error : ')' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1024) : error C2059: syntax error : 'delete' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1025) : error C2143: syntax error : missing ';' before '{' d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1025) : error C2447: '{' : missing function header (old-style formal list?) d:\Applications\DirectX 9.0 SDK\Include\d3dx9math.inl(1025) : fatal error C1003: error count exceeds 100; stopping compilation
EDIT: Solved [Edited by - utilae on August 9, 2005 11:17:08 PM]

HTML5, iOS and Android Game Development using Corona SDK and moai SDK

Advertisement
Just off the top of my head, are you including ONLY your own stuff after you include the memory manager header? < > - stuff before the manager and " " - includes after.
Try including your files like this:

#include "nommgr.h"//standard includes/your includes#include "mmgr.h"


This will ensure all other libraries use the standard operator new/delete and not the tracking versions. The project I'm working on uses that memory manager so I've run into problems like yours on a few occaisons but arranging the header files like above in the offending source file solved the problem.
I am using BCB6 and it won't coimpile for me either....:(
1)
Do I have to include "mmgr.h" in each of my files, eg
in
Texture.h, Globals.h, Interface.h, etc

2)
Will it create logs for each file, eg
TextureLog.txt, GlobalsLog.txt, InterfaceLog.txt, etc

3)
Edit:
I did what Spudder said. I have to include "nommgr.h", then standard and my own includes and lastly "mmgr.h". This had to be done for each file. An example of the way I did it is below:
//Globals.h============#include "nommgr.h"//no memory manager#include <string>//not my filesusing std::string;#include <sstream>using namespace std;#include "mine.h"//mine#include "mmgr.h"//memory manager//A.h======#include "nommgr.h"//no memory manager#include "Globals.h"//mine#include "mmgr.h"//memory manager//B.h======#include "nommgr.h"//no memory manager#include "Globals.h"//mine#include "mmgr.h"//memory manager//C.h======#include "nommgr.h"//no memory manager#include "Globals.h"//mine#include "mmgr.h"//memory manager//Interface.h==============#include "nommgr.h"//no memory manager#include "A.h"//mine#include "B.h"//mine#include "C.h"//mine#include "mmgr.h"//memory manager


[Edited by - utilae on August 9, 2005 11:59:18 PM]

HTML5, iOS and Android Game Development using Corona SDK and moai SDK

This topic is closed to new replies.

Advertisement