Problem Compiling OgreOdeJoint.h

Plague

13-11-2007 21:56:07

I get to the following enumeration and crash.

enum Parameter
{
Parameter_LowStop = dParamLoStop,
Parameter_HighStop = dParamHiStop,
Parameter_LowStop2 = dParamLoStop2, // SliderHingeJoint
Parameter_HighStop2 = dParamHiStop2, // SliderHingeJoint
Parameter_MotorVelocity = dParamVel,
Parameter_MaximumForce = dParamFMax,
Parameter_FudgeFactor = dParamFudgeFactor,
Parameter_Bounceyness = dParamBounce,
Parameter_CFM = dParamCFM,
Parameter_ERP = dParamERP,


This is the crash report.

C:/ogreode/include/OgreOdeJoint.h:59: error: `dParamERP' was not declared in this scope
C:/ogreode/include/OgreOdeJoint.h:59: error: enumerator value for `Parameter_ERP' not integer constant


I'm tempted to remove the dParamERP, but I'd much rather not. Could anyone tell me how to fix this?

Aquatix

14-11-2007 06:30:56

Just update to the latest version and that's all! ;)

tgraupmann2

15-11-2007 21:31:59

This is the same issue that I was seeing. I'll get a CVS update as indicated.

Aquatix

16-11-2007 15:08:46

Now I remember, what was wrong - you had to update ode as well. In worst case you can download a prebuilt SDK - it works.

Here's the link.

and a stripped-down version.

Plague

19-11-2007 20:22:55

There must be some confusion (probably my fault). I'm not attempting to compile the entire thing from source, I'm trying to get the SDKs to work in my ogre application.

I'm still getting the same error, I've commented out the line in question and moved on.

GameProducer

20-11-2007 10:24:30

I'm getting the same error... I downloaded the SDK, and put those new files. Still there's the same error.

I don't think commenting the line away would be such a good idea :)

Aquatix

20-11-2007 12:00:48

Well, I reupped the includes only, try again!
Here's the link.

1337

06-01-2008 12:07:56

Hi everyone

I'm having the same trouble as described above.
What I have done so far:
- get latest CVS version of ODE
- compile ODE using Visual Studio 2005
- get latest CVS version of OgreODE in the ogre CVS

And here comes the issue: The compiler doesn't seem to think, that dParamERP was declared in the first place. I have tried a some things in order to figure out what the problem is (switch dParamCFM and dParamERP in the ODE common.h file as an example). Curiously it only seems to affect dParamERP, even though the problem should actually switch to dParamCFM if i switch them.

Furthermore, I have searched for other occurences of dParamERP, but couldn't find any. My conclusion is: I'm totally puzzled as to why such an error can occur in the first place (in this strange way).


Does anyone know what I could do to fix the problem? Or has anyone compiled ODE and OgreODE latest with Visual Studio without getting errors?

rv

07-01-2008 09:13:21

having exact the same problem
so where's dParamERP? trying to figure out...

btw, i'm usnig C::B with latest OgreODE SDK



UPDATE: I got some clues: dParamERP is defined in ode/common.h, as what 1337 mentioned


/* standard joint parameter names. why are these here? - because we don't want
* to include all the joint function definitions in joint.cpp. hmmmm.
* MSVC complains if we call D_ALL_PARAM_NAMES_X with a blank second argument,
* which is why we have the D_ALL_PARAM_NAMES macro as well. please copy and
* paste between these two.
*/

#define D_ALL_PARAM_NAMES(start) \
/* parameters for limits and motors */ \
dParamLoStop = start, \
dParamHiStop, \
dParamVel, \
dParamFMax, \
dParamFudgeFactor, \
dParamBounce, \
dParamCFM, \
dParamStopERP, \
dParamStopCFM, \
/* parameters for suspension */ \
dParamSuspensionERP, \
dParamSuspensionCFM, \
dParamERP, \

#define D_ALL_PARAM_NAMES_X(start,x) \
/* parameters for limits and motors */ \
dParamLoStop ## x = start, \
dParamHiStop ## x, \
dParamVel ## x, \
dParamFMax ## x, \
dParamFudgeFactor ## x, \
dParamBounce ## x, \
dParamCFM ## x, \
dParamStopERP ## x, \
dParamStopCFM ## x, \
/* parameters for suspension */ \
dParamSuspensionERP ## x, \
dParamSuspensionCFM ## x, \
dParamERP ## x,

enum {
D_ALL_PARAM_NAMES(0)
D_ALL_PARAM_NAMES_X(0x100,2)
D_ALL_PARAM_NAMES_X(0x200,3)

/* add a multiple of this constant to the basic parameter numbers to get
* the parameters for the second, third etc axes.
*/
dParamGroup=0x100
};

1337

07-01-2008 13:29:03

yeah, and it's within a macro. No flaw in it, as I can see. I mean, ODE compiles fine, so...

But I have tried a lot of little changes and they all showed strange behaviour. And in C++ this can only mean one thing: The problem is somewhere else. Unfortunately, I'm stuck.

Still, the general recommendation is updating, but I already am up-to-date.