Including HelloWorld in own engine

Heast
Posts: 2
Joined: Sun Dec 20, 2009 8:33 am

Including HelloWorld in own engine

Post by Heast »

Hi!
I'm a complete beginner to Bullet and have the following problem:

I want to include the HelloWorld-program into my engine for testing purposes.
So I've copypasted the code as a method into my engine (of course also included headers, dependencies etc.). It compiles without problems, but when he executes the line

Code: Select all

btDiscreteDynamicsWorld* dynamicsWorld = new btDiscreteDynamicsWorld(dispatcher,overlappingPairCache,solver,collisionConfiguration);
I get a std::bad_alloc exception.
I have really no idea why, the code is exactly the same like in the stand alone-program and I've compared the values of dispatcher, overlappingPairCache, solver and collisionConfiguration and they are exactly the same in both programs.

I'm really out of ideas, any help would be appreciated

Greetings
Heast
Posts: 2
Joined: Sun Dec 20, 2009 8:33 am

Re: Including HelloWorld in own engine

Post by Heast »

Any ideas? :(
Spawn
Posts: 22
Joined: Wed Sep 02, 2009 3:52 am

Re: Including HelloWorld in own engine

Post by Spawn »

I got about the same problem before. Is WIN32 defined? Did you remember to change the flags to /MT?

I used VC++ 2008 Express and that's how I fixed it.