EDIT: I've solved the problem
I have some trouble with the following code:
This gives me the following error:
How can a single static pointer break my build?
EDIT: Don't know what i did. But it works now.
I have some trouble with the following code:
Code:
class BodyFactory{
public:
static b2World* world; //here comes trouble
static BodyComponent* box(f32 x, f32 y, f32 w, f32 h);
};
public:
static b2World* world; //here comes trouble
static BodyComponent* box(f32 x, f32 y, f32 w, f32 h);
};
This gives me the following error:
Code:
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Add(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|95|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Persist(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|99|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Remove(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|103|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Result(const b2ContactResult*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|106|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Add(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|95|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Persist(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|99|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Remove(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|103|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Result(const b2ContactResult*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|106|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Add(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|95|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Persist(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|99|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Remove(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|103|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Result(const b2ContactResult*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|106|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Add(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|95|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Persist(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|99|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Remove(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|103|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Result(const b2ContactResult*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|106|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Add(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|95|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Persist(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|99|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Remove(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|103|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Result(const b2ContactResult*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|106|warning: statement has no effect|
C:\Documents and Settings\Helsing\Skrivebord\openglbasic (WIP)\PhysicComponents.cpp|13|warning: 'world' defined but not used|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Add(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|95|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Persist(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|99|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Remove(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|103|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Result(const b2ContactResult*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|106|warning: statement has no effect|
obj\Debug\Game_init.o(.text+0x3e5)||In function `ZN11b2DebugDrawD1Ev':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|124|undefined reference to `BodyFactory::world|
||=== Build finished: 1 errors, 25 warnings ===|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|95|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Persist(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|99|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Remove(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|103|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Result(const b2ContactResult*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|106|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Add(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|95|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Persist(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|99|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Remove(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|103|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Result(const b2ContactResult*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|106|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Add(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|95|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Persist(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|99|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Remove(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|103|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Result(const b2ContactResult*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|106|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Add(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|95|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Persist(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|99|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Remove(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|103|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Result(const b2ContactResult*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|106|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Add(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|95|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Persist(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|99|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Remove(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|103|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Result(const b2ContactResult*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|106|warning: statement has no effect|
C:\Documents and Settings\Helsing\Skrivebord\openglbasic (WIP)\PhysicComponents.cpp|13|warning: 'world' defined but not used|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Add(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|95|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Persist(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|99|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Remove(const b2ContactPoint*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|103|warning: statement has no effect|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h||In member function `virtual void b2ContactListener::Result(const b2ContactResult*)':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|106|warning: statement has no effect|
obj\Debug\Game_init.o(.text+0x3e5)||In function `ZN11b2DebugDrawD1Ev':|
C:\Development\mingw\Box2D\Include\..\Source\Dynamics\b2WorldCallbacks.h|124|undefined reference to `BodyFactory::world|
||=== Build finished: 1 errors, 25 warnings ===|
How can a single static pointer break my build?
EDIT: Don't know what i did. But it works now.