Error compiling Critter using VS2005

joarley

05-07-2010 16:38:48

Hello guys,

Recently I downloaded the latest version of NxOgre Detritus and Critter from github repository. I've successfully compiled NxOgre but I got some errors when tried to compile Critter. The error messages are like this:

1>c:\dev\...\nxogre_critter\build\source\CritterBody.h(61) : error C2888: 'T *NxOgre::GC::safe_new4(const A1 &,const A2 &,const A3 &,const A4 &,const char *,int)' : symbol cannot be defined within namespace 'Critter'

I see that Critter has build project only for VS2008 (VC9) and unfortunately I'm currently using VS2005 (VC8). Probably this is the problem. But I can shift right now to VC9, because I have many dependencies that only work on VC8.

I've found this:
http://www.ogre3d.org/addonforums/viewtopic.php?f=6&t=12587#p70963. But not solved. :(

I've also read this:
http://www.codeguru.com/forum/archive/index.php/t-324827.html that seems to be a compiler incompatibility with such definition.

Is there any way out here?

Thanks

betajaen

05-07-2010 18:58:05

That is really odd.

What you could do is remove all the all lines in Body, PointRenderable, etc that are like:

NXOGRE_GC_FRIEND_NEW?
NXOGRE_GC_FRIEND_DELETE


? = 0..9

Then move the constructor/destructors to the public section of the class definition, it should compile then.

joarley

05-07-2010 19:17:58

Thanks betajaen for your quick reply.

I did just as you said and I got everything compiled. I just got a few warnings:

1>NxOgre.lib(NxOgre.dll) : warning LNK4006: __NULL_IMPORT_DESCRIPTOR already defined in OgreMain.lib(OgreMain.dll); second definition ignored
1>NxOgre.lib(NxOgre.dll) : warning LNK4221: no public symbols found; archive member will be inaccessible
1>CritterStable.obj : warning LNK4221: no public symbols found; archive member will be inaccessible


Is that fine?

Thank you a lot.

betajaen

05-07-2010 19:31:33

Should be okay, I get those too.

joarley

06-07-2010 17:38:29

Hi again,

Do you have any idea why am I getting this weird error:

1>c:\dev\...\WalkthroughState.h(42) : error C2039: 'TimeController' : is not a member of 'NxOgre'

I sense this may have to do with the workaround we've made in order to get Critter compiled. But that doesn't make much sense since TimeController is a member of NxOgre (I suppose so).

I get thit on the following declaration:

NxOgre::TimeController *mTimeController;


I've included both:

#include <NxOgre.h>
#include <Critter.h>


The odd is that I get no errors for other definitions like:


NxOgre::World *mWorld;
NxOgre::Scene *mScene;
Critter::RenderSystem *mRenderSystem;


Thanks

betajaen

06-07-2010 18:03:53

Nope nothing to do with you, I removed it in the last few updates, you inject time via World now;

mWorld->advance(deltaTime);

If you don't know, there are a ton of tutorials written with these latest versions of Detritus in mind; http://github.com/betajaen/nxogretutorials

joarley

06-07-2010 18:32:28

Thanks man.

That looks really easier.
I'll take a look at the tutorials as well.

joarley

07-07-2010 11:57:21

Just for the record, for those that are following this tutorial http://github.com/betajaen/nxogretutorials/blob/master/text/101.textile.
In part 7, you'll still find the old way of working with time.

And the tutorial apps are really great. I could easily rewrite my BloodyMess code just based on them.

betajaen, is there known problem with the tutorial 1004 (Cloths and pipes)? It crashes when I try to start it. The others run fine.

Thanks

betajaen

07-07-2010 12:45:43

Yep, I should update that file.

1004 doesn't crash for me, but it doesn't work as I intended it do be. The mesh I used has separate vertices for each triangle, so when the balloon pops it's does a very strange explosion. I haven't found a solution for it yet.

Also if you want any of the theory behind the tutorials checkout the PhysX tutorials that come with the SDK, the tutorial numbers in the SDK match up with my tutorials. ;)