chen
22-07-2008 18:45:17
I need help!
I got my environment setup, and everything building cleanly on VC9 Express, no compile errors or warnings. However, I get one of those horrible runtime crashes and I have my head scratching as to why it is failing...
I'm doing a release build, and I have placed OgreMain.dll, NxOgre.dll, PhysXLoader.dll, and NxCooking.dll in the same release directory where I'm running my exe. It immediately crashes on startup, almost as if I had forgotten a dll. Any suggestions?
I got my environment setup, and everything building cleanly on VC9 Express, no compile errors or warnings. However, I get one of those horrible runtime crashes and I have my head scratching as to why it is failing...
// main.cpp
#define WIN32_LEAN_AND_MEAN
#include "windows.h"
#include "MyWorld.h"
INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT)
{
MyWorld app;
return 0;
}
// MyWorld.h
#include "NxOgre.h"
class MyWorld {
private:
NxOgre::World *world;
NxOgre::Scene *scene;
NxOgre::Body *body;
NxOgre::Actor *actor;
NxOgre::ActorGroup *group1;
NxOgre::ActorGroup *group2;
public:
MyWorld();
void do_my_physics();
};
// MyWorld.cpp
#include "MyWorld.h"
MyWorld::MyWorld()
{
do_my_physics();
}
void MyWorld::do_my_physics()
{
world = new NxOgre::World("time-controller: ogre");
scene = world->createScene("Eddie", "gravity: yes, floor: yes, renderer: ogre");
actor = scene->createActor("Atlas", new NxOgre::Sphere(0.5), Ogre::Vector3(3, 10, -2), "mass: 10");
}
I'm doing a release build, and I have placed OgreMain.dll, NxOgre.dll, PhysXLoader.dll, and NxCooking.dll in the same release directory where I'm running my exe. It immediately crashes on startup, almost as if I had forgotten a dll. Any suggestions?