Errors in BtCollisionObject

Rademanc
Posts: 11
Joined: Mon Nov 02, 2009 11:55 am

Errors in BtCollisionObject

Post by Rademanc »

Hi there. I compiled the demos for bullet 2.75, they run fine.
But when I want to use bullet in my project I get a lot of errors. They all have to do with
ATTRIBUTE_ALIGNED16()
and
BT_DECLARE_ALIGNED_ALLOCATOR();
for example:
btCollisionObject.h(107) : error C2059: syntax error : 'string'
btCollisionObject.h(107) : error C2091: function returns function
error C2802: static member 'operator new' has no formal parameters
btCollisionObject::operator new' : error in function declaration; skipping function body
syntax error : 'string'
error C2556: 'btCollisionObject operator delete(void *,void *)' : overloaded function differs only by return type from 'void operator delete(void *,void *)'
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\new.h(111) : see declaration of 'operator delete'
error C2143: syntax error : missing ';' before '['
etc.

Is there something I missed? Preprocessor perhaps?
aleradish
Posts: 22
Joined: Thu Mar 05, 2009 9:41 pm

Re: Errors in BtCollisionObject

Post by aleradish »

Hi,

I think your error is a problem of a mistake in declaration on same class. It gave the same to me if, for example in the .h file
i declarate

void Method(Ogre::entity E);

and in the .cpp class I declare

void Class::Method(Ogre::entity* E){} or anything like that.

Another problem that you can have is when you declare a class with virtual method (that you have to extend in your subclass) and in the subclass the method is not extended in the right method.

I hope that this can help you...
Bye