I am getting linker errors like this one...
And also the same for ... b2Shape.obj, b2Joint.obj, b2PolyContact.obj, b2CircleContact.obj, and b2PolyAndCircleContact.obj.
Looking at the respective headers, these appear to be the files that have "#include <new>".
It appears that this is conflicting with another definition of new that is used elsewhere in the engine I am using. Since I am unable to track down and remove that, perhaps there is a way to fix this on the b2d side?
This linker error occurs when I include the required headers for my engine and box2d.h in a source file and I then try to allocate something.
Here is an example of how b2d seems to allocate things...
Is there a way to get rid of this multi-definition without breaking the way b2-allocates stuff, or at least with minimal changes to it?
Code:
1>box2d.lib(b2World.obj) : warning LNK4006: "void * __cdecl operator new(unsigned int,void *)" (??2@YAPAXIPAX@Z) already defined in winMemory.obj; second definition ignored
And also the same for ... b2Shape.obj, b2Joint.obj, b2PolyContact.obj, b2CircleContact.obj, and b2PolyAndCircleContact.obj.
Looking at the respective headers, these appear to be the files that have "#include <new>".
It appears that this is conflicting with another definition of new that is used elsewhere in the engine I am using. Since I am unable to track down and remove that, perhaps there is a way to fix this on the b2d side?
This linker error occurs when I include the required headers for my engine and box2d.h in a source file and I then try to allocate something.
Here is an example of how b2d seems to allocate things...
Code:
void* mem = b2Alloc(sizeof(b2BroadPhase));
m_broadPhase = new (mem) b2BroadPhase(worldAABB, &m_contactManager);
m_broadPhase = new (mem) b2BroadPhase(worldAABB, &m_contactManager);
Is there a way to get rid of this multi-definition without breaking the way b2-allocates stuff, or at least with minimal changes to it?